patchGNU MIX Development Kit - Patches: patch #9776, GTK Console input no longer...


You are not allowed to post comments on this tracker with your current authentication level.

patch #9776: GTK Console input no longer overruns buffer

Submitter:  Kevin Brunelle <brunk23>
Submitted:  Wed 20 Mar 2019 11:58:12 PM UTC
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  jao Open/Closed:  Open

Tue 09 Apr 2019 01:46:07 AM UTC, comment #1: 

Thanks a lot, applied!

It's great to have someone looking carefully over my shoulder :)

Jose Antonio Ortega Ruiz <jao>
Group administrator
Wed 20 Mar 2019 11:58:12 PM UTC, original submission:  

The console input in gmixvm will only read 70 characters, but the outer loop used 70 (the characters) instead of 14 (the number of words). This caused the VM to read past the end of the buffer and write 56 words of junk into the emulator.

I have corrected this, using "SIZES_[mix_dev_CONSOLE]" in place of the constant.

   if (result == GTK_RESPONSE_OK)
       text = g_strdup_printf ("%-70s", gtk_entry_get_text (input_dlg_entry_));
-      for (i = 0; i < 70; ++i)
+      for (i = 0; i < SIZES_[mix_dev_CONSOLE]; ++i)
         for (j = 0; j < 5; ++j)
           mix_word_set_byte (block + i, j + 1,

The patch is attached.

Thanks for all you do,
Kevin Brunelle

Kevin Brunelle <brunk23>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #46596:  gtk-console-input.patch added by brunk23 (534B - text/x-patch)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by jao (Posted a comment)
  • -email is unavailable- added by brunk23 (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.


    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-04-09 jao StatusNone Done
        Assigned toNone jao
    2019-03-20 brunk23 Attached File- Added gtk-console-input.patch, #46596

    Back to the top

    Powered by Savane 3.13-b921.
    Corresponding source code