MozillaSecurity / lithium

Line-based testcase reducer
Mozilla Public License 2.0
95 stars 25 forks source link

TestcaseJsStr should ignore unmatched quote characters while scanning #66

Closed jschwartzentruber closed 6 years ago

jschwartzentruber commented 6 years ago

When reducing a testcase with TestcaseJsStr containing broken strings, this assertion is hit:

AssertionError: Unexpected EOF looking for end of string (')

A better approach would be to continue parsing as though the starting string were not there. Eg.

'abc', "'123'

Currently this hits the above assertion. I propose to parse it as follows (ignoring the unmatched "):

'
a
b
c
', "'
1
2
3
'