diff options
author | John Gilmore <gnu@cygnus> | 1991-05-30 08:52:52 +0000 |
---|---|---|
committer | John Gilmore <gnu@cygnus> | 1991-05-30 08:52:52 +0000 |
commit | d11c44f1ee9650339d5c874d3227611f82e3f104 (patch) | |
tree | 23487e3405f8e4c1202d95d6c3e3fa4fe67ac2fb /gdb/dbxread.c | |
parent | 924bbb3815705cba6e369cbea2dff86884e9265a (diff) | |
download | gdb-d11c44f1ee9650339d5c874d3227611f82e3f104.zip gdb-d11c44f1ee9650339d5c874d3227611f82e3f104.tar.gz gdb-d11c44f1ee9650339d5c874d3227611f82e3f104.tar.bz2 |
Roll in Tiemann changes for gcc -ansi. Fix assorted bugs. See ChangeLog.
Diffstat (limited to 'gdb/dbxread.c')
-rw-r--r-- | gdb/dbxread.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/dbxread.c b/gdb/dbxread.c index cd87db4..4644fef 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -121,7 +121,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "command.h" #include "target.h" #include "gdbcore.h" /* for bfd stuff */ -#include "liba.out.h" /* FIXME Secret internal BFD stuff for a.out */ +#include "libaout.h" /* FIXME Secret internal BFD stuff for a.out */ #include "symfile.h" struct dbx_symfile_info { @@ -4986,6 +4986,7 @@ read_huge_number (pp, end, valu, bits) char overflow = 0; int nbits = 0; int c; + long upper_limit; if (*p == '-') { @@ -5001,9 +5002,10 @@ read_huge_number (pp, end, valu, bits) p++; } + upper_limit = LONG_MAX / radix; while ((c = *p++) >= '0' && c <= ('0' + radix)) { - if (n <= LONG_MAX / radix) + if (n <= upper_limit) { n *= radix; n += c - '0'; /* FIXME this overflows anyway */ |