[Nasm-bugs] [Bug 3392599] git nasm: nondeterministic errors when building lDebug assembler tables

noreply-nasm at dev.nasm.us noreply-nasm at dev.nasm.us
Thu Oct 10 02:02:27 PDT 2019


https://bugzilla.nasm.us/show_bug.cgi?id=3392599

--- Comment #10 from C. Masloch <pushbx at ulukai.org> ---
The bootimg test seems like it may suffer from the bug described in
https://bugzilla.nasm.us/show_bug.cgi?id=3392621#c1

The other error may be in %strcat handling, in the following hunk:

@@ -3491,21 +3552,21 @@ issue_error:
          * zero, and a numeric token to use as an expansion. Create
          * and store an SMacro.
          */
-        macro_start = new_Token(NULL, TOK_STRING, NULL, 0);
-        macro_start->text = nasm_quote(pp, len);
+        macro_start = make_tok_qstr(pp);
         nasm_free(pp);
         define_smacro(ctx, mname, casesense, 0, macro_start);
         free_tlist(tline);
         free_tlist(origline);
         return DIRECTIVE_FOUND;


From
https://repo.or.cz/nasm.git/commitdiff/8b262474424c0f6912b22bbf7452f26bfa4d1235

In
https://repo.or.cz/nasm.git/blame_incremental/d03a6c8ffedd1496221eca5f02ba0215794cfaf9:/asm/preproc.c#l4199
I think we can see that the string is not zero-terminated. However,
make_tok_qstr expects a zero-terminated string as it uses strlen to determine
the length. Prior to the hunk I quoted, nasm_quote was passed the length in its
second parameter.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are on the CC list for the bug.


More information about the Nasm-bugs mailing list