This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch/committed]: VMS lib: fix traverse index


Hi,

the index pointer was not correctly updated for extended key names, leading to crashes.

(Funny, we correctly generated these entries).

Committed on trunk.

Tristan.

bfd/
2011-12-23  Tristan Gingold  <gingold@adacore.com>

        * vms-lib.c (vms_traverse_index): Move pointer update code.

diff --git a/bfd/vms-lib.c b/bfd/vms-lib.c
index b325d74..48d656b 100644
--- a/bfd/vms-lib.c
+++ b/bfd/vms-lib.c
@@ -277,6 +277,9 @@ vms_traverse_index (bfd *abfd, unsigned int vbn, struct cars
       if (idx_vbn == 0)
         return FALSE;
 
+      /* Point to the next index entry.  */
+      p = keyname + keylen;
+
       if (idx_off == RFADEF__C_INDEX)
         {
           /* Indirect entry.  Recurse.  */
@@ -368,9 +371,6 @@ vms_traverse_index (bfd *abfd, unsigned int vbn, struct cars
                 return FALSE;
             }
         }
-
-      /* Point to the next index entry.  */
-      p = keyname + keylen;
     }
 
   return TRUE;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]