summaryrefslogtreecommitdiff
path: root/gtk/gtkaccelgroup.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-04-10 08:24:03 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-04-10 08:24:03 -0400
commitad1bc75dd2cf5cb758e9a12cd0792e850a55fed8 (patch)
tree4f596afbe4322203e789987f742b7b56f4c5a29f /gtk/gtkaccelgroup.c
parent8780906b9339b8bd9fe764c0ac7e7f057dd57952 (diff)
downloadgtk+-ad1bc75dd2cf5cb758e9a12cd0792e850a55fed8.tar.gz
accelgroup: Fix an invalid write
This was lost by accident in d110fddbce14d13c. Fixes: #2602
Diffstat (limited to 'gtk/gtkaccelgroup.c')
-rw-r--r--gtk/gtkaccelgroup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gtkaccelgroup.c b/gtk/gtkaccelgroup.c
index 0cf685c2d8..964974abb4 100644
--- a/gtk/gtkaccelgroup.c
+++ b/gtk/gtkaccelgroup.c
@@ -592,7 +592,7 @@ gtk_accelerator_name (guint accelerator_key,
keyval_name = "";
saved_mods = accelerator_mods;
- l = 0;
+ l = strlen (keyval_name);
if (accelerator_mods & GDK_SHIFT_MASK)
l += sizeof (text_shift) - 1;
if (accelerator_mods & GDK_CONTROL_MASK)