mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 19:20:35 +00:00
(menu) Fix heap overflow
Some struct video_shader fields have sizes defined by macros, menu.h and video_shader_parse.h had different values for some of them. This resulted in menu.c allocating a ~120KB struct video_shader while video_shader_parse.c tried to memset() a ~150KB. For some reason this was only triggered in 32bit environments.
This commit is contained in:
parent
ffa4c58f1a
commit
e18e4494e7
@ -20,7 +20,6 @@
|
||||
#include "menu_cbs.h"
|
||||
#include "menu_display.h"
|
||||
#include "menu_hash.h"
|
||||
#include "menu_shader.h"
|
||||
|
||||
#include "../general.h"
|
||||
#include "../frontend/frontend.h"
|
||||
|
15
menu/menu.h
15
menu/menu.h
@ -25,24 +25,11 @@
|
||||
#include <boolean.h>
|
||||
|
||||
#include "menu_driver.h"
|
||||
#include "menu_shader.h"
|
||||
#include "../driver.h"
|
||||
#include "../input/input_driver.h"
|
||||
#include "../dynamic.h"
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_HLSL) || defined(HAVE_GLSL)
|
||||
#ifndef HAVE_SHADER_MANAGER
|
||||
#define HAVE_SHADER_MANAGER
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef GFX_MAX_PARAMETERS
|
||||
#define GFX_MAX_PARAMETERS 64
|
||||
#endif
|
||||
|
||||
#ifndef GFX_MAX_SHADERS
|
||||
#define GFX_MAX_SHADERS 16
|
||||
#endif
|
||||
|
||||
#ifndef MAX_COUNTERS
|
||||
#define MAX_COUNTERS 64
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user