From e12c50d274198fdc6a60429a193eef95be391173 Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Mon, 6 Sep 2010 19:36:15 +0400 Subject: [PATCH] BR3060469: Fix SIGSEV on missed %deftok second parameter In case if a second parameter of %deftok is missed we hit NULL dereference. Fix it. Reported-by: Christian Masloch Signed-off-by: Cyrill Gorcunov --- preproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/preproc.c b/preproc.c index 5fafbd4c..e3b0c640 100644 --- a/preproc.c +++ b/preproc.c @@ -3177,7 +3177,7 @@ issue_error: while (tok_type_(t, TOK_WHITESPACE)) t = t->next; /* t should now point to the string */ - if (t->type != TOK_STRING) { + if (!tok_type_(t, TOK_STRING)) { error(ERR_NONFATAL, "`%s` requires string as second parameter", pp_directives[i]); -- 2.11.4.GIT