parse literals more like Postgres by tbg · Pull Request #1807 · cockroachdb/cockroach (original) (raw)

@tbg

found via go-fuzz, ping @dvyukov.

data0: "INSERT INTO O VALUES ('\0\n\n')"
data1: "INSERT INTO O VALUES ('\0\n\n')"
panic: not equal

petermattis

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't you append the strMod byte above where the opening ' is appended?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done. Remnants from earlier code where I hoped not to have to iterate twice.

@petermattis

@tbg

with this change

found via go-fuzz, ping @dvyukov.

@tbg

tbg added a commit that referenced this pull request

Jul 26, 2015

@tbg

parse literals more like Postgres

@tbg tbg deleted the sql_literals branch

July 26, 2015 15:55