summaryrefslogtreecommitdiff
path: root/preproc.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-07-31 18:46:11 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-07-31 18:46:11 -0700
commit932de6c252b2420c3e0f0a8d4d90463d59ae4869 (patch)
tree55b675bb582354ac25fb97342b7a80233c011969 /preproc.c
parentf7d863b7d1703b055f11e0087baac640b016b880 (diff)
downloadnasm-932de6c252b2420c3e0f0a8d4d90463d59ae4869.tar.gz
nasm-932de6c252b2420c3e0f0a8d4d90463d59ae4869.tar.bz2
nasm-932de6c252b2420c3e0f0a8d4d90463d59ae4869.zip
BR 2034542: fix crash when touching __FILE__
Touching __FILE__ would cause a dereference of an uninitialized pointer. Fix.
Diffstat (limited to 'preproc.c')
-rw-r--r--preproc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/preproc.c b/preproc.c
index 7ba1b6f..feb1164 100644
--- a/preproc.c
+++ b/preproc.c
@@ -3493,7 +3493,7 @@ again:
if (!m->expansion) {
if (!strcmp("__FILE__", m->name)) {
int32_t num = 0;
- char *file;
+ char *file = NULL;
src_get(&num, &file);
tline->text = nasm_quote(file, strlen(file));
tline->type = TOK_STRING;