Fix null deref in the ELF version parser
test/bins/fuzz: null_pointer__elf_init__store_versioninfo__store_versioninfo_gnu_versym
This commit is contained in:
parent
6eb93dbf21
commit
0b17d35d18
|
@ -801,7 +801,10 @@ static Sdb *store_versioninfo_gnu_versym(ELFOBJ *bin, Elf_(Shdr) *shdr, int sz)
|
|||
goto beach;
|
||||
}
|
||||
const char *name = bin->strtab + vda.vda_name;
|
||||
sdb_set (sdb, key, sdb_fmt ("%s(%s%-*s)", tmp_val, name, (int)(12 - strlen (name)),")") , 0);
|
||||
if (name) {
|
||||
const char *fname = sdb_fmt ("%s(%s%-*s)", tmp_val, name, (int)(12 - strlen (name)),")");
|
||||
sdb_set (sdb, key, fname, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue