From e39462cbbb93f82b920eb5fd2b593003fe896182 Mon Sep 17 00:00:00 2001 From: Jan-Benedict Glaw Date: Tue, 1 Oct 2013 10:32:54 +0000 Subject: [PATCH] 2013-10-01 Jan-Benedict Glaw * dwarf.c (SAFE_BYTE_GET): Fix argument check. --- binutils/ChangeLog | 4 ++++ binutils/dwarf.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 95ada6f7b2f..761d2a3a573 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,7 @@ +2013-10-01 Jan-Benedict Glaw + + * dwarf.c (SAFE_BYTE_GET): Fix argument check. + 2013-09-27 H.J. Lu * dwarf.c (display_debug_frames): Pass offset_size to diff --git a/binutils/dwarf.c b/binutils/dwarf.c index bd736477c38..283aceb4958 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)) \ { \ -- 2.30.2