diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2017-10-22 21:26:36 +0300 |
---|---|---|
committer | Cyrill Gorcunov <gorcunov@gmail.com> | 2017-10-22 21:26:36 +0300 |
commit | 6f8109ebf18e3de69a8a2ad63867fe8498e49bf0 (patch) | |
tree | 07f5dac93bedf59a391dfb229ce4aaa3e33042f2 | |
parent | 7524cfd91492e6e3719b959498be584a9ced13af (diff) | |
download | nasm-6f8109ebf18e3de69a8a2ad63867fe8498e49bf0.tar.gz |
preproc: Fix SIGSEGV if not data provided for implicit pasting
https://bugzilla.nasm.us/show_bug.cgi?id=3392423
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rw-r--r-- | asm/preproc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/asm/preproc.c b/asm/preproc.c index 43b62aa7..9642edcb 100644 --- a/asm/preproc.c +++ b/asm/preproc.c @@ -3848,8 +3848,8 @@ static bool paste_tokens(Token **head, const struct tokseq_match *m, next = next->next; } - /* No match */ - if (tok == next) + /* No match or no text to process */ + if (tok == next || len == 0) break; len += strlen(tok->text); |