Fix index out of bound during static analysis parsing

Signed-off-by: gaulthier gain <gaulthier.gain@uliege.be>
This commit is contained in:
gaulthier gain 2021-01-29 14:37:53 +01:00
parent 3167eb4b05
commit 81e5677e1a

View file

@ -36,8 +36,12 @@ func parseReadELF(output string, data *u.StaticData) {
if len(words) > 8 && types[words[3]] {
symbol := strings.Split(words[7], "@")
data.Symbols[symbol[0]] = symbol[1]
}
if len(symbol) > 2{
data.Symbols[symbol[0]] = symbol[1]
}else{
data.Symbols[words[7]] = ""
}
}
}
}