commit 2164466746ef9f02cb90944d20d32b9ffbd86366
Author:     Maarten van Gompel <[email protected]>
AuthorDate: Sun Jul 11 17:53:44 2021 +0200
Commit:     Hiltjo Posthuma <[email protected]>
CommitDate: Mon Jul 12 12:33:44 2021 +0200

    protection against segfault if overlay has more keys than the keyboard 
itself

diff --git a/svkbd.c b/svkbd.c
index be688b5..38a549a 100644
--- a/svkbd.c
+++ b/svkbd.c
@@ -1062,6 +1062,8 @@ showoverlay(int idx)
                        j++;
                if (overlay[i].width > 1)
                        j += overlay[i].width - 1;
+               if (j >= numkeys)
+                       break;
                keys[j].label = overlay[i].label;
                keys[j].label2 = overlay[i].label2;
                keys[j].keysym = overlay[i].keysym;

Reply via email to