summaryrefslogtreecommitdiff
path: root/src/backend/regex/regexport.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-02-03 01:39:08 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2016-02-03 01:39:08 -0500
commit1f2b195ebf1c1646b20111f1c339fbaebb04da56 (patch)
tree5ff866fc1c2f5fd6eea0ecc71386ea2fee9c8563 /src/backend/regex/regexport.c
parent0b55fef393e6fae6086bce7704c3b2a369600a32 (diff)
Fix IsValidJsonNumber() to notice trailing non-alphanumeric garbage.
Commit e09996ff8dee3f70 was one brick shy of a load: it didn't insist that the detected JSON number be the whole of the supplied string. This allowed inputs such as "2016-01-01" to be misdetected as valid JSON numbers. Per bug #13906 from Dmitry Ryabov. In passing, be more wary of zero-length input (I'm not sure this can happen given current callers, but better safe than sorry), and do some minor cosmetic cleanup.
Diffstat (limited to 'src/backend/regex/regexport.c')
0 files changed, 0 insertions, 0 deletions