Too long filenames were causing crashes/segfaults

This commit is contained in:
twinaphex 2017-04-15 02:38:22 +02:00
parent f9b75e7d76
commit 592fe4d967
3 changed files with 13 additions and 13 deletions

View File

@ -52,7 +52,7 @@ static struct string_list *subsystem_fullpaths = NULL;
static char subsystem_path[PATH_MAX_LENGTH] = {0}; static char subsystem_path[PATH_MAX_LENGTH] = {0};
static char path_default_shader_preset[PATH_MAX_LENGTH] = {0}; static char path_default_shader_preset[PATH_MAX_LENGTH] = {0};
static char path_main_basename[PATH_MAX_LENGTH] = {0}; static char path_main_basename[8192] = {0};
static char path_content[PATH_MAX_LENGTH] = {0}; static char path_content[PATH_MAX_LENGTH] = {0};
static char path_libretro[PATH_MAX_LENGTH] = {0}; static char path_libretro[PATH_MAX_LENGTH] = {0};
static char path_config_file[PATH_MAX_LENGTH] = {0}; static char path_config_file[PATH_MAX_LENGTH] = {0};

View File

@ -186,7 +186,7 @@ void runloop_msg_queue_push(const char *msg,
**/ **/
static bool rarch_game_specific_options(char **output) static bool rarch_game_specific_options(char **output)
{ {
char game_path[255]; char game_path[8192];
game_path[0] ='\0'; game_path[0] ='\0';

View File

@ -128,27 +128,27 @@ typedef struct global
{ {
struct struct
{ {
char savefile[4096]; char savefile[8192];
char savestate[4096]; char savestate[8192];
char cheatfile[4096]; char cheatfile[8192];
char ups[4096]; char ups[8192];
char bps[4096]; char bps[8192];
char ips[4096]; char ips[8192];
char remapfile[4096]; char remapfile[8192];
} name; } name;
/* Recording. */ /* Recording. */
struct struct
{ {
char path[4096]; char path[8192];
char config[4096]; char config[8192];
unsigned width; unsigned width;
unsigned height; unsigned height;
size_t gpu_width; size_t gpu_width;
size_t gpu_height; size_t gpu_height;
char output_dir[4096]; char output_dir[8192];
char config_dir[4096]; char config_dir[8192];
bool use_output_dir; bool use_output_dir;
} record; } record;