diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2008-06-17 21:37:27 (GMT) |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2008-06-17 21:37:27 (GMT) |
commit | d600848c10b42b702e31257a81190ab2f4e844f1 (patch) | |
tree | 79e7270eeb52353a379e11e17592b851cc0a0a68 /patches/gdb/6.7/150-gdb-6.5-dwarf-stack-overflow.patch | |
parent | 9a236415c392142410340aaa3d3965793898cecd (diff) |
Add patches for gdb 6.7, 6.7.1 and 6.8, vampirised from the Gentoo CVS.
/trunk/patches/gdb/6.7.1/175-gdb-hppa-offsets.patch | 272 272 0 0 +++++++++++++++++++
/trunk/patches/gdb/6.7.1/200-gdb-deleted-children.patch | 26 26 0 0 ++
/trunk/patches/gdb/6.7.1/225-gdb-6.5-dwarf-stack-overflow.patch | 52 52 0 0 ++++
/trunk/patches/gdb/6.7.1/150-gdb-6.3-security-errata-20050610.patch | 205 205 0 0 ++++++++++++++
/trunk/patches/gdb/6.7/150-gdb-6.5-dwarf-stack-overflow.patch | 52 52 0 0 ++++
/trunk/patches/gdb/6.7/100-gdb-6.3-security-errata-20050610.patch | 205 205 0 0 ++++++++++++++
/trunk/patches/gdb/6.7/125-gdb-hppa-offsets.patch | 272 272 0 0 +++++++++++++++++++
/trunk/patches/gdb/6.8/100-gdb-6.5-dwarf-stack-overflow.patch | 52 52 0 0 ++++
/trunk/patches/gdb/6.8/200-gdb-tdep-opcode-include-workaround.patch | 33 33 0 0 ++
/trunk/patches/gdb/6.8/150-gdb-6.3-security-errata-20050610.patch | 205 205 0 0 ++++++++++++++
10 files changed, 1374 insertions(+)
Diffstat (limited to 'patches/gdb/6.7/150-gdb-6.5-dwarf-stack-overflow.patch')
-rw-r--r-- | patches/gdb/6.7/150-gdb-6.5-dwarf-stack-overflow.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/patches/gdb/6.7/150-gdb-6.5-dwarf-stack-overflow.patch b/patches/gdb/6.7/150-gdb-6.5-dwarf-stack-overflow.patch new file mode 100644 index 0000000..171e64e --- /dev/null +++ b/patches/gdb/6.7/150-gdb-6.5-dwarf-stack-overflow.patch @@ -0,0 +1,52 @@ +Original patch from gentoo: gentoo/src/patchsets/gdb/6.7/80_all_gdb-6.5-dwarf-stack-overflow.patch +-= BEGIN original header =- +http://bugs.gentoo.org/144833 + +for gdb/ChangeLog: +2006-08-22 Will Drewry <wad@google.com> + Tavis Ormandy <taviso@google.com> + + * dwarf2read.c (decode_locdesc): Enforce location description stack + boundaries. + * dwarfread.c (locval): Likewise. + +-= END original header =- +diff -durN gdb-6.7.orig/gdb/dwarf2read.c gdb-6.7/gdb/dwarf2read.c +--- gdb-6.7.orig/gdb/dwarf2read.c 2007-09-05 02:51:48.000000000 +0200 ++++ gdb-6.7/gdb/dwarf2read.c 2008-06-17 23:25:38.000000000 +0200 +@@ -9061,8 +9061,7 @@ + callers will only want a very basic result and this can become a + complaint. + +- Note that stack[0] is unused except as a default error return. +- Note that stack overflow is not yet handled. */ ++ Note that stack[0] is unused except as a default error return. */ + + static CORE_ADDR + decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu) +@@ -9079,7 +9078,7 @@ + + i = 0; + stacki = 0; +- stack[stacki] = 0; ++ stack[++stacki] = 0; + + while (i < size) + { +@@ -9261,6 +9260,16 @@ + dwarf_stack_op_name (op)); + return (stack[stacki]); + } ++ /* Enforce maximum stack depth of size-1 to avoid ++stacki writing ++ outside of the allocated space. Also enforce minimum > 0. ++ -- wad@google.com 14 Aug 2006 */ ++ if (stacki >= sizeof (stack) / sizeof (*stack) - 1) ++ internal_error (__FILE__, __LINE__, ++ _("location description stack too deep: %d"), ++ stacki); ++ if (stacki <= 0) ++ internal_error (__FILE__, __LINE__, ++ _("location description stack too shallow")); + } + return (stack[stacki]); + } |