pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/cross/avr-gdb Add bounds checking for prologue buffer....



details:   https://anonhg.NetBSD.org/pkgsrc/rev/97b00f2325b8
branches:  trunk
changeset: 462976:97b00f2325b8
user:      wennmach <wennmach%pkgsrc.org@localhost>
date:      Tue Oct 21 14:19:37 2003 +0000

description:
Add bounds checking for prologue buffer. This avoids avr-gdb crashes
when debugging programs without prologue.

Patch provided by Karl Janmar < karl -AT- utopiafoundation -DOT- org >
in PR pkg/23154

diffstat:

 cross/avr-gdb/Makefile         |   3 ++-
 cross/avr-gdb/distinfo         |   3 ++-
 cross/avr-gdb/patches/patch-ab |  16 ++++++++++++++++
 3 files changed, 20 insertions(+), 2 deletions(-)

diffs (43 lines):

diff -r 9c4f628f605d -r 97b00f2325b8 cross/avr-gdb/Makefile
--- a/cross/avr-gdb/Makefile    Tue Oct 21 12:52:51 2003 +0000
+++ b/cross/avr-gdb/Makefile    Tue Oct 21 14:19:37 2003 +0000
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.3 2003/07/22 18:09:13 wennmach Exp $
+# $NetBSD: Makefile,v 1.4 2003/10/21 14:19:37 wennmach Exp $
 # FreeBSD Id: ports/devel/avr-gdb/Makefile,v 1.2 2003/03/07 06:00:08 ade Exp
 
 DISTNAME=      gdb-5.3
 PKGNAME=       avr-gdb-5.3
+PKGREVISION=   1
 CATEGORIES=    cross
 MASTER_SITES=  ${MASTER_SITE_SOURCEWARE:=gdb/releases/}
 
diff -r 9c4f628f605d -r 97b00f2325b8 cross/avr-gdb/distinfo
--- a/cross/avr-gdb/distinfo    Tue Oct 21 12:52:51 2003 +0000
+++ b/cross/avr-gdb/distinfo    Tue Oct 21 14:19:37 2003 +0000
@@ -1,3 +1,4 @@
-$NetBSD: distinfo,v 1.3 2003/07/24 08:39:58 wennmach Exp $
+$NetBSD: distinfo,v 1.4 2003/10/21 14:19:37 wennmach Exp $
 
 SHA1 (gdb-5.3.tar.gz) = 24a6c9da6e89b1b82b7508f27f94098d989ff662
+SHA1 (patch-ab) = b74ff228047ccb45267e1302e4bef20716b255f4
diff -r 9c4f628f605d -r 97b00f2325b8 cross/avr-gdb/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/cross/avr-gdb/patches/patch-ab    Tue Oct 21 14:19:37 2003 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-ab,v 1.1 2003/10/21 14:19:37 wennmach Exp $
+
+*** gdb/avr-tdep.c.org Sun Oct 12 02:35:53 2003
+--- gdb/avr-tdep.c     Sun Oct 12 02:58:30 2003
+***************
+*** 480,485 ****
+--- 480,488 ----
+       prologue_end = fi->pc;
+        else if (sal.end < prologue_end)       /* next line begins after fn end */
+       prologue_end = sal.end; /* (probably means no prologue)  */
++ 
++       /* Check that we don't use a prologue larger then AVR_MAX_PROLOGUE_SIZE */
++       prologue_end = min (prologue_end, prologue_start + AVR_MAX_PROLOGUE_SIZE);
+      }
+    else
+      /* We're in the boondocks: allow for */



Home | Main Index | Thread Index | Old Index