[Nasm-bugs] [Bug 3392696] Null dereference in nasm_quote

noreply-nasm at dev.nasm.us noreply-nasm at dev.nasm.us
Sat Jul 11 07:34:10 PDT 2020


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

--- Comment #1 from Cyrill Gorcunov <gorcunov at gmail.com> ---
This is due to commit 41e9682efed7cd1df133b1b4ac806e07723f1486 where quoting
API has been reworked but there are callers which do not follow new semantics.
For example

static Token *quote_any_token(Token *t)
{
    size_t len;
    char *p;

    p = nasm_quote(tok_text(t), &len);
    t->type = TOK_STRING;
    return set_text_free(t, p, len);
}

The @len is simply uninitialized here but nasm_quote will treat it as having
proper string length. Need to fix all callers I think.

-- 
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