menu: fix a buffer overflow
authornotaz <notasas@gmail.com>
Sat, 8 Feb 2020 19:29:08 +0000 (21:29 +0200)
committernotaz <notasas@gmail.com>
Sat, 8 Feb 2020 19:29:08 +0000 (21:29 +0200)
Reported by @wwhheerree, closes #152.

frontend/menu.c

index 0b3f553..6d75373 100644 (file)
@@ -815,7 +815,7 @@ static void draw_savestate_bg(int slot)
 
                // darken this so that menu text is visible
                if (g_menuscreen_w - w < 320)
-                       menu_darken_bg(d, d, w * 2, 0);
+                       menu_darken_bg(d, d, w, 0);
        }
 
 out: