Skip to content

Bug: cannot read property 'charCodeAt' of undefined #669

Open
@yevgenypats

Description

@yevgenypats

Hey,

Found the following bug that can be reproduced with:

const wast = require("@webassemblyjs/wast-parser");
wast.parse('"\u0019g ')

Thrown:
TypeError: Cannot read property 'charCodeAt' of undefined
    at isNewLine (/Users/yevgenyp/fuzzitdev/jsfuzz/node_modules/@webassemblyjs/wast-parser/lib/tokenizer.js:33:15)
    at tokenize (/Users/yevgenyp/fuzzitdev/jsfuzz/node_modules/@webassemblyjs/wast-parser/lib/tokenizer.js:347:13)
    at Object.parse (/Users/yevgenyp/fuzzitdev/jsfuzz/node_modules/@webassemblyjs/wast-parser/lib/index.js:31:40)

Found using jsfuzz

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions