mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-04-12 18:40:23 +08:00
Prevent segfault in stabs64_typevalue
Prevent segfault when type == STT_OBJECT and no symbol has been defined.
This commit is contained in:
parent
5a99f4f2f0
commit
f3d2d41e06
output
@ -1486,7 +1486,7 @@ void stabs32_typevalue(int32_t type)
|
||||
stype = STT_NOTYPE;
|
||||
break;
|
||||
}
|
||||
if (stype == STT_OBJECT && !lastsym->type) {
|
||||
if (stype == STT_OBJECT && lastsym && !lastsym->type) {
|
||||
lastsym->size = ssize;
|
||||
lastsym->type = stype;
|
||||
}
|
||||
|
@ -1500,7 +1500,7 @@ void stabs64_typevalue(int32_t type)
|
||||
stype = STT_NOTYPE;
|
||||
break;
|
||||
}
|
||||
if (stype == STT_OBJECT && !lastsym->type) {
|
||||
if (stype == STT_OBJECT && lastsym && !lastsym->type) {
|
||||
lastsym->size = ssize;
|
||||
lastsym->type = stype;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user