summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2017-10-22 19:01:16 +0300
committerCyrill Gorcunov <gorcunov@gmail.com>2017-10-22 19:01:16 +0300
commit7524cfd91492e6e3719b959498be584a9ced13af (patch)
tree93046741709558e3435206ea0457654337418d64
parent59ce1c67b16967c652765e62aa130b7e43f21dd4 (diff)
downloadnasm-7524cfd91492e6e3719b959498be584a9ced13af.tar.gz
preproc: Fix sigsegv in find_cc
For specially formed code we can have skip_white_ to end up with nil pointer which should be taken into account. https://bugzilla.nasm.us/show_bug.cgi?id=3392435 Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rw-r--r--asm/preproc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/asm/preproc.c b/asm/preproc.c
index cd4a9494..43b62aa7 100644
--- a/asm/preproc.c
+++ b/asm/preproc.c
@@ -3714,6 +3714,8 @@ static int find_cc(Token * t)
return -1; /* Probably a %+ without a space */
skip_white_(t);
+ if (!t)
+ return -1;
if (t->type != TOK_ID)
return -1;
tt = t->next;