MozillaSecurity / lithium

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

TestcaseJsStr does not handle the end of string correctly if it is the last character. #64

Closed jschwartzentruber closed 6 years ago

jschwartzentruber commented 6 years ago

The following testcase is parsed incorrectly by TestcaseJsStr:

'abc'

Instead of expected:

before = "'"
parts = ["a", "b", "c"]
after = "'"

It actually gets split like this, resulting in a bad reduction:

before = "'"
parts = ["a", "b", "c", "'"]
after = ""