Skip to content

3.1.35+ contains NUL characters in JS #19230

@RReverser

Description

@RReverser

In 3.1.35+ output seems to have escape sequences unescaped. It's hard to demonstrate by copy-pasting the code so I'll paste screenshot from an editor that shows that a comment on UTF8ToString now has a literal NUL (0) character:

image

and this is what it looked like before:

image

This caused problems in a C program that reads the JS file as a string and then tries to process it as a C string (that is, by stopping at said NUL character).

I narrowed it down to #19097 which moved code & comments into JS strings, but now that \0 is inside a JS string, it gets unescaped by the engine: f188340#diff-9b6499e625a2216c99e6a18e621462ba263fc408745bd38487fb9cefef61e1d0R104 cc @sbc100

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions