mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-10-10 00:25:06 -04: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:
@@ -1743,7 +1743,9 @@ static void nasm_verror_gnu(int severity, const char *fmt, va_list ap)
|
|||||||
if (!(severity & ERR_NOFILE)) {
|
if (!(severity & ERR_NOFILE)) {
|
||||||
src_get(&lineno, ¤tfile);
|
src_get(&lineno, ¤tfile);
|
||||||
if (!currentfile || (severity & ERR_TOPFILE)) {
|
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;
|
lineno = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user