This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[patch/committed]: VMS lib: fix traverse index
- From: Tristan Gingold <gingold at adacore dot com>
- To: binutils Development <binutils at sourceware dot org>
- Date: Fri, 23 Dec 2011 10:25:45 +0100
- Subject: [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;