summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2010-09-06 19:36:15 +0400
committerCyrill Gorcunov <gorcunov@gmail.com>2010-09-06 19:44:51 +0400
commite12c50d274198fdc6a60429a193eef95be391173 (patch)
tree7a2a0485ef7278e2338f7360d770c1be527ba826
parent2d3dce2fd7f0f8547f71a88aaecf0c12565162b1 (diff)
downloadnasm-e12c50d274198fdc6a60429a193eef95be391173.tar.gz
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 <gorcunov@gmail.com>
-rw-r--r--preproc.c2
1 files changed, 1 insertions, 1 deletions
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]);