diff options
author | Theodore A. Roth <troth@openavr.org> | 2003-06-14 20:33:39 +0000 |
---|---|---|
committer | Theodore A. Roth <troth@openavr.org> | 2003-06-14 20:33:39 +0000 |
commit | 57bc612204774251fc7371a5fff99e83170814e1 (patch) | |
tree | 045849df89bf9282147652b50a24c5dca2151346 | |
parent | b257a0d30ab67df224f603c928127f2e653660b9 (diff) | |
download | gdb-57bc612204774251fc7371a5fff99e83170814e1.zip gdb-57bc612204774251fc7371a5fff99e83170814e1.tar.gz gdb-57bc612204774251fc7371a5fff99e83170814e1.tar.bz2 |
* avr-tdep.c (avr_scan_prologue): Fix to avoid a buffer over run which
causes gdb to seg fault.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/avr-tdep.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9dac8f2..79578ab 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2003-06-14 Theodore A. Roth <troth@openavr.org> + + * avr-tdep.c (avr_scan_prologue): Fix to avoid a buffer over run which + causes gdb to seg fault. + 2003-06-14 Daniel Jacobowitz <drow@mvista.com> * sparc-nat.c (fetch_inferior_registers): Correct diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c index df1ffdd..e9d5996 100644 --- a/gdb/avr-tdep.c +++ b/gdb/avr-tdep.c @@ -486,7 +486,7 @@ avr_scan_prologue (struct frame_info *fi) frame pointer, adjust the stack pointer, and save registers. */ get_frame_extra_info (fi)->framesize = 0; - prologue_len = prologue_end - prologue_start; + prologue_len = min (prologue_end - prologue_start, AVR_MAX_PROLOGUE_SIZE); read_memory (prologue_start, prologue, prologue_len); /* Scanning main()'s prologue |