2013-10-01 Jan-Benedict Glaw <jbglaw@lug-owl.de>
authorJan-Benedict Glaw <jbglaw@lug-owl.de>
Tue, 1 Oct 2013 10:32:54 +0000 (10:32 +0000)
committerJan-Benedict Glaw <jbglaw@lug-owl.de>
Tue, 1 Oct 2013 10:32:54 +0000 (10:32 +0000)
* dwarf.c (SAFE_BYTE_GET): Fix argument check.

binutils/ChangeLog
binutils/dwarf.c

index 95ada6f7b2fc803c21fa8bdce12d0645dba59e2c..761d2a3a573be481e3edeeb34e1ecbe968439db3 100644 (file)
@@ -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
index bd736477c38bc89e5275f883fdcf6987e5d85f97..283aceb4958417970fa985b818552b654b867800 100644 (file)
@@ -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))           \
        {                                       \