From: Paul Brook Date: Sun, 16 May 2004 21:10:24 +0000 (+0000) Subject: * options.c (gfc_handle_module_path_options): Fix buffer overrun. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=629ceb937ac50b7ef41f48fdfba3e1f5a55c6068;p=gcc.git * options.c (gfc_handle_module_path_options): Fix buffer overrun. From-SVN: r81925 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 9eed0e926e4..535840c4a1c 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,7 @@ +2004-05-16 Paul Brook + + * options.c (gfc_handle_module_path_options): Fix buffer overrun. + 2004-05-16 Paul Brook * arith.c (gfc_range_check): Fix logic error. diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c index 5fb874091e0..f0135bd7f95 100644 --- a/gcc/fortran/options.c +++ b/gcc/fortran/options.c @@ -155,7 +155,7 @@ gfc_handle_module_path_options (const char *arg) exit (3); } - gfc_option.module_dir = (char *) gfc_getmem (strlen (arg)); + gfc_option.module_dir = (char *) gfc_getmem (strlen (arg) + 2); strcpy (gfc_option.module_dir, arg); strcat (gfc_option.module_dir, "/"); }