aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2004-05-16 21:10:24 +0000
committerPaul Brook <pbrook@gcc.gnu.org>2004-05-16 21:10:24 +0000
commit629ceb937ac50b7ef41f48fdfba3e1f5a55c6068 (patch)
treef7e20d07ec149fa4451533fd25781d4a0487592a /gcc/fortran
parent6d3e9d84546050e45a24a63b5bab723f513d75ce (diff)
downloadgcc-629ceb937ac50b7ef41f48fdfba3e1f5a55c6068.zip
gcc-629ceb937ac50b7ef41f48fdfba3e1f5a55c6068.tar.gz
gcc-629ceb937ac50b7ef41f48fdfba3e1f5a55c6068.tar.bz2
* options.c (gfc_handle_module_path_options): Fix buffer overrun.
From-SVN: r81925
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog4
-rw-r--r--gcc/fortran/options.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 9eed0e9..535840c 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,5 +1,9 @@
2004-05-16 Paul Brook <paul@codesourcery.com>
+ * options.c (gfc_handle_module_path_options): Fix buffer overrun.
+
+2004-05-16 Paul Brook <paul@codesourcery.com>
+
* arith.c (gfc_range_check): Fix logic error.
2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
index 5fb8740..f0135bd 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, "/");
}