From: David Griffith Date: Sat, 25 Aug 2012 04:36:24 +0000 (-0700) Subject: Fixed a problem where filenames of a certain length would cause a crash. X-Git-Url: https://scope-eye.net/git/?a=commitdiff_plain;h=6d3f7643898e182d30f73764943d366490fc187a;p=liskon_frotz.git Fixed a problem where filenames of a certain length would cause a crash. --- diff --git a/src/curses/ux_init.c b/src/curses/ux_init.c index 2b6afb9..89a4d5c 100644 --- a/src/curses/ux_init.c +++ b/src/curses/ux_init.c @@ -299,7 +299,7 @@ void os_process_arguments (int argc, char *argv[]) /* Create nice default file names */ - u_setup.blorb_name = malloc(strlen(f_setup.story_name) * sizeof(char) + 5); + u_setup.blorb_name = malloc(FILENAME_MAX); strncpy(u_setup.blorb_name, f_setup.story_name, strlen(f_setup.story_name) +1); strncat(u_setup.blorb_name, EXT_BLORB, strlen(EXT_BLORB));