Hello, MBSE Developer Team,
I have found and fixed an error with the 'HelP' window shown in the internal editor, which causes the editor to crash:
1.) Steps to reproduce:
- Enter a message in the internal editor
- In the editor, press <ESC> and then <H> to display the help text
window - Press a key to close the help text window - Try to continue
to edit the message text -> an error message appears, then the BBS disconnects
2.) Root cause analysis:
- The function "void Full_Help(void)" in fsedit.c utilizes several helper functions to draw the help-text window. These helper functions access and manipulate the gobal variables "int Col" and "int Row"
causing an overflow of the "Row" variable. This overflow will lead to
a Segfault when "Refresh()" function is called before resuming editing
of the text.
3.) Solution:
- i've added tow local variables "int hc" and "int hr" to the
function "void Full_Help(void)" which are being used to temporary
store the original values if "int Col" and "int Row" at the beginning
of the function before drawing the help-text window. Once this is
drawn, "int Col" and "int Row" are being assigned the original values temporarily stored in "int hc" and "int hr". That way, the call to "Refresh()" after drawing the help-text window will no longer crash
and operate as intended.
Do you want me to create a MR for this fix?
I have found and fixed an error with the 'HelP' window shown in the internal
editor, which causes the editor to crash:
I have found and fixed an error with the 'HelP' window shown in the internal
editor, which causes the editor to crash:
Sysop: | Saxainden |
---|---|
Location: | Littleton, CO |
Users: | 33 |
Nodes: | 10 (0 / 10) |
Uptime: | 20:46:58 |
Calls: | 373 |
Messages: | 36,794 |