protection against segfault if overlay has more keys than the keyboard itself - svkbd - simple virtual keyboard
 (HTM) git clone git://git.suckless.org/svkbd
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 2164466746ef9f02cb90944d20d32b9ffbd86366
 (DIR) parent b70948b74c19f916bc9e1a610ea1a2a215a54900
 (HTM) Author: Maarten van Gompel <proycon@anaproy.nl>
       Date:   Sun, 11 Jul 2021 17:53:44 +0200
       
       protection against segfault if overlay has more keys than the keyboard itself
       
       Diffstat:
         M svkbd.c                             |       2 ++
       
       1 file changed, 2 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git 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;