(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:
Higor Eurípedes 2015-12-05 18:13:13 -03:00
parent ffa4c58f1a
commit e18e4494e7
2 changed files with 1 additions and 15 deletions

View File

@ -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"

View File

@ -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