Fix index out of bound during static analysis parsing
Signed-off-by: gaulthier gain <gaulthier.gain@uliege.be>
This commit is contained in:
parent
3167eb4b05
commit
81e5677e1a
1 changed files with 6 additions and 2 deletions
|
@ -36,8 +36,12 @@ func parseReadELF(output string, data *u.StaticData) {
|
||||||
|
|
||||||
if len(words) > 8 && types[words[3]] {
|
if len(words) > 8 && types[words[3]] {
|
||||||
symbol := strings.Split(words[7], "@")
|
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]] = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue