[gtk/gtk-3-24] accelgroup: Fix a buffer overrun



commit 0d6cff45c3acb3288eaea5a123b2ee81ec7d12d6
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Dec 23 23:17:29 2019 -0500

    accelgroup: Fix a buffer overrun
    
    gtk_accelerator_parse_with_keycode can
    overrun its buffer for certain inputs.
    
    Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/2325

 gtk/gtkaccelgroup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtkaccelgroup.c b/gtk/gtkaccelgroup.c
index 3b514d2302..cf32e019f9 100644
--- a/gtk/gtkaccelgroup.c
+++ b/gtk/gtkaccelgroup.c
@@ -1306,9 +1306,9 @@ gtk_accelerator_parse_with_keycode (const gchar     *accelerator,
               last_ch = *accelerator;
               while (last_ch && last_ch != '>')
                 {
-                  last_ch = *accelerator;
                   accelerator += 1;
                   len -= 1;
+                  last_ch = *accelerator;
                 }
             }
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]