From: nasm-bot f. C. G. <gor...@gm...> - 2017-10-22 16:03:13
|
Commit-ID: 7524cfd91492e6e3719b959498be584a9ced13af Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=7524cfd91492e6e3719b959498be584a9ced13af Author: Cyrill Gorcunov <gor...@gm...> AuthorDate: Sun, 22 Oct 2017 19:01:16 +0300 Committer: Cyrill Gorcunov <gor...@gm...> CommitDate: Sun, 22 Oct 2017 19:01:16 +0300 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 <gor...@gm...> --- asm/preproc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/asm/preproc.c b/asm/preproc.c index cd4a949..43b62aa 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; |