diff options
author | Andreas Schwab <schwab@linux-m68k.org> | 2006-08-24 12:43:10 +0000 |
---|---|---|
committer | Andreas Schwab <schwab@linux-m68k.org> | 2006-08-24 12:43:10 +0000 |
commit | f414f22f4be7f09b6b5eea0b0a61f535ee6d9137 (patch) | |
tree | 7992cdc6659c5f24bf7d5fad6de07a79bafa9887 /gdb | |
parent | 00e96125e7162fc2dfcffd4a8bc2251578a0bd2f (diff) | |
download | gdb-f414f22f4be7f09b6b5eea0b0a61f535ee6d9137.zip gdb-f414f22f4be7f09b6b5eea0b0a61f535ee6d9137.tar.gz gdb-f414f22f4be7f09b6b5eea0b0a61f535ee6d9137.tar.bz2 |
* symfile.c (add_symbol_file_command): Fix off-by-one when
extending sect_opts.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/symfile.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3a115e2..88d52a7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2006-08-24 Andreas Schwab <schwab@suse.de> + + * symfile.c (add_symbol_file_command): Fix off-by-one when + extending sect_opts. + 2006-08-24 Nick Roberts <nickrob@snap.net.nz> * mi/gdb-mi.el: Refer to next release of Emacs as 22.1. diff --git a/gdb/symfile.c b/gdb/symfile.c index 8a6c65b..2036a07 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -1853,7 +1853,7 @@ add_symbol_file_command (char *args, int from_tty) to load the program. */ sect_opts[section_index].name = ".text"; sect_opts[section_index].value = arg; - if (++section_index > num_sect_opts) + if (++section_index >= num_sect_opts) { num_sect_opts *= 2; sect_opts = ((struct sect_opt *) @@ -1889,7 +1889,7 @@ add_symbol_file_command (char *args, int from_tty) { sect_opts[section_index].value = arg; expecting_sec_addr = 0; - if (++section_index > num_sect_opts) + if (++section_index >= num_sect_opts) { num_sect_opts *= 2; sect_opts = ((struct sect_opt *) |