summaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorJan-Benedict Glaw <jbglaw@lug-owl.de>2013-10-01 10:32:54 +0000
committerJan-Benedict Glaw <jbglaw@lug-owl.de>2013-10-01 10:32:54 +0000
commitc046570b61e3742f8b2fa1113bc292ed1c95e827 (patch)
treec5493d552ed7951d1822a6774b9ff495f1640708 /binutils
parentac3541e02efcb7378b9a16c42e7e27acdc7e0c60 (diff)
downloadbinutils-redhat-c046570b61e3742f8b2fa1113bc292ed1c95e827.tar.gz
2013-10-01 Jan-Benedict Glaw <jbglaw@lug-owl.de>
* dwarf.c (SAFE_BYTE_GET): Fix argument check.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog4
-rw-r--r--binutils/dwarf.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 95ada6f7b2..761d2a3a57 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-01 Jan-Benedict Glaw <jbglaw@lug-owl.de>
+
+ * dwarf.c (SAFE_BYTE_GET): Fix argument check.
+
2013-09-27 H.J. Lu <hongjiu.lu@intel.com>
* dwarf.c (display_debug_frames): Pass offset_size to
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index bd736477c3..283aceb495 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -288,7 +288,7 @@ read_uleb128 (unsigned char * data,
#define SAFE_BYTE_GET(VAL, PTR, AMOUNT, END) \
do \
{ \
- int dummy [sizeof (VAL) < (AMOUNT) ? -1 : 0] ATTRIBUTE_UNUSED ; \
+ int dummy [sizeof (VAL) < (AMOUNT) ? -1 : 1] ATTRIBUTE_UNUSED ; \
unsigned int amount = (AMOUNT); \
if (((PTR) + amount) >= (END)) \
{ \