Avoid reading past datum end when parsing JSON.

Noah Misch <noah@leadboat.com>

Commit: 66008564f8ce570f7ad6368fbde2138e946d328b
Author: Noah Misch <noah@leadboat.com>
Date: 2013-06-12T23:51:12Z
Releases: 9.3.0
Avoid reading past datum end when parsing JSON.

Several loops in the JSON parser examined a byte in memory just before
checking whether its address was in-bounds, so they could read one byte
beyond the datum's allocation.  A SIGSEGV is possible.  New in 9.3, so
no back-patch.

Files

PathChange+/−
src/backend/utils/adt/json.c modified +13 −8