• Fixed Segfault bug in internal editor

    From Niels Haedecke@2:240/8002 to All on Wed Jan 31 07:37:50 2024

    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?

    Kind regards,
    Niels

    Greetings, Niels Haedecke

    --- MBSE BBS v1.0.8.4 (Linux-aarch64)
    * Origin: Wintermute BBS - Duesseldorf, Germany (2:240/8002)
  • From Andrew Leary@1:320/219 to Niels Haedecke on Wed Jan 31 11:31:00 2024
    Hello Niels!

    31 Jan 24 07:37, you wrote to all:

    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?

    Please submit a diff to me at 1:320/219. Thank you for your detailed bug report and fix.

    Regards,

    Andrew
    MBSE Development Team

    --- GoldED+/LNX 1.1.5-b20230826
    * Origin: Phoenix BBS * phoenix.bnbbbs.net (1:320/219)
  • From Sean Dennis@1:18/200 to Niels Haedecke on Wed Jan 31 12:56:00 2024
    I have found and fixed an error with the 'HelP' window shown in the internal
    editor, which causes the editor to crash:

    Thank you for noticing that and fixing it!

    -- Sean

    --- ProBoard v2.17 [Reg]
    * Origin: Outpost BBS * Johnson City, TN (1:18/200)
  • From Sean Dennis@1:18/200 to Niels Haedecke on Wed Jan 31 12:56:00 2024
    I have found and fixed an error with the 'HelP' window shown in the internal
    editor, which causes the editor to crash:

    Thank you for noticing that and fixing it!

    -- Sean

    --- ProBoard v2.17 [Reg]
    * Origin: Outpost BBS * Johnson City, TN (1:18/200)