diff options
author | Steven G. Kargl <kargl@gcc.gnu.org> | 2007-02-14 20:02:39 +0000 |
---|---|---|
committer | Steven G. Kargl <kargl@gcc.gnu.org> | 2007-02-14 20:02:39 +0000 |
commit | 64e56cf2553bc45b4e7da3dfbd31b5c390273bcd (patch) | |
tree | 9d59b6bfbb77dbbfad2994cf9fdbe2c252358dc6 /gcc/fortran/misc.c | |
parent | 23ced53f12d019b9d47288a408a0237b8fb796b4 (diff) | |
download | gcc-64e56cf2553bc45b4e7da3dfbd31b5c390273bcd.zip gcc-64e56cf2553bc45b4e7da3dfbd31b5c390273bcd.tar.gz gcc-64e56cf2553bc45b4e7da3dfbd31b5c390273bcd.tar.bz2 |
Fix a potential buffer overflow.
From-SVN: r121958
Diffstat (limited to 'gcc/fortran/misc.c')
-rw-r--r-- | gcc/fortran/misc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fortran/misc.c b/gcc/fortran/misc.c index c0150ed..f1fdbf5 100644 --- a/gcc/fortran/misc.c +++ b/gcc/fortran/misc.c @@ -152,7 +152,8 @@ gfc_basic_typename (bt type) const char * gfc_typename (gfc_typespec *ts) { - static char buffer1[60], buffer2[60]; /* FIXME: Buffer overflow. */ + static char buffer1[GFC_MAX_SYMBOL_LEN + 7]; /* 7 for "TYPE()" + '\0'. */ + static char buffer2[GFC_MAX_SYMBOL_LEN + 7]; static int flag = 0; char *buffer; |