Merge tag 'nasm-2.12.02'

NASM 2.12.02

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
H. Peter Anvin 2016-07-14 13:47:51 -07:00
commit 7e70f4dbb3
2 changed files with 8 additions and 5 deletions

View File

@ -2017,8 +2017,7 @@ static void nasm_verror_common(int severity, const char *fmt, va_list args)
* Don't suppress this with skip_this_pass(), or we don't get
* pass1 or preprocessor warnings in the list file
*/
if ((severity & ERR_MASK) >= ERR_WARNING)
lfmt->error(severity, pfx, msg);
lfmt->error(severity, pfx, msg);
if (severity & ERR_USAGE)
want_usage = true;

View File

@ -1264,9 +1264,13 @@ static char *detoken(Token * tlist, bool expand_locals)
if (!p) {
nasm_error(ERR_NONFATAL | ERR_PASS1,
"nonexistent environment variable `%s'", v);
p = "";
}
t->text = nasm_strdup(p);
/*
* FIXME We better should investigate if accessing
* ->text[1] without ->text[0] is safe enough.
*/
t->text = nasm_zalloc(2);
} else
t->text = nasm_strdup(p);
}
nasm_free(q);
}