mirror of
https://github.com/netwide-assembler/nasm
synced 2026-08-26 16:23:04 -04: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
2 changed files with 2 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue