Browse code

Fix an off-by-one error when parsing SHT_GNU_versym sections.

Xavier G authored on 23/08/2015 23:03:22
Showing 1 changed files
... ...
@@ -3303,6 +3303,7 @@ sub walkVersym {
3303 3303
 	for (my $i = 0; $i < $count; ++ $i) {
3304 3304
 		sayf($ind, '[%d/%d] symbol version entry at index #%s:', $i + 1, $count, $i);
3305 3305
 		if (!$i) {
3306
+			readELFValue($elf_fh, 'Half');
3306 3307
 			say($ind + 1, 'Skipping as the symbol table entry for index 0 (STN_UNDEF) is reserved');
3307 3308
 			next;
3308 3309
 		}