mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-02-23 17:29:23 +08:00
Fix sigsegv if two outputs specified
outname is only set up by pass two so earlier access may lead to sigsegv. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
parent
744100dc14
commit
f5a48a6ba2
@ -1743,7 +1743,9 @@ static void nasm_verror_gnu(int severity, const char *fmt, va_list ap)
|
||||
if (!(severity & ERR_NOFILE)) {
|
||||
src_get(&lineno, ¤tfile);
|
||||
if (!currentfile || (severity & ERR_TOPFILE)) {
|
||||
currentfile = inname[0] ? inname : outname[0] ? outname : NULL;
|
||||
currentfile = inname && inname[0] ?
|
||||
inname : outname && outname[0] ?
|
||||
outname : NULL;
|
||||
lineno = 0;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user