[gtk] accelgroup: Fix a buffer overrun



commit 2a7b5d822957e873f1d496da396f2fb6cc14498e
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 f09764ec74..dbf4e261af 100644
--- a/gtk/gtkaccelgroup.c
+++ b/gtk/gtkaccelgroup.c
@@ -1295,9 +1295,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]