From: nasm-bot f. C. G. <gor...@gm...> - 2017-10-22 18:30:42
|
Commit-ID: 6f8109ebf18e3de69a8a2ad63867fe8498e49bf0 Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=6f8109ebf18e3de69a8a2ad63867fe8498e49bf0 Author: Cyrill Gorcunov <gor...@gm...> AuthorDate: Sun, 22 Oct 2017 21:26:36 +0300 Committer: Cyrill Gorcunov <gor...@gm...> CommitDate: Sun, 22 Oct 2017 21:26:36 +0300 preproc: Fix SIGSEGV if not data provided for implicit pasting https://bugzilla.nasm.us/show_bug.cgi?id=3392423 Signed-off-by: Cyrill Gorcunov <gor...@gm...> --- asm/preproc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asm/preproc.c b/asm/preproc.c index 43b62aa..9642edc 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); |