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 /gdb/avr-tdep.c | |
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.
Diffstat (limited to 'gdb/avr-tdep.c')
-rw-r--r-- | gdb/avr-tdep.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 |