Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
yevgenypats opened this issue Oct 20, 2019 · 2 comments
Open

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

yevgenypats opened this issue Oct 20, 2019 · 2 comments

Comments

@yevgenypats
Copy link

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

@xtuc
Copy link
Owner

xtuc commented Oct 23, 2019

Would you mind sending a PR?

@yevgenypats
Copy link
Author

hey @xtuc !:) I'm not sure I'll have time in the near future but I suggest marking this as bug/help wanted and maybe someone will be able to contribute the PR before me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants