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

Submitted by:  Kevin Brunelle <brunk23>
Submitted on:  Wed 20 Mar 2019 11:58:12 PM UTC  
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  Jose Antonio Ortega Ruiz <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>
Project AdministratorIn charge of this item.
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,
                              mix_char_to_byte

The patch is attached.

Thanks for all you do,
Kevin Brunelle

Kevin Brunelle <brunk23>

 

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)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    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.5