pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Only adjust negative indexes in json_get up to the length of the
2+ messages / 1 participants
[nested] [flat]

* pgsql: Only adjust negative indexes in json_get up to the length of the
@ 2015-07-28 21:59  Andrew Dunstan <andrew@dunslane.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Andrew Dunstan @ 2015-07-28 21:59 UTC (permalink / raw)
  To: pgsql-committers

Only adjust negative indexes in json_get up to the length of the path.

The previous code resulted in memory access beyond the path bounds. The
cure is to move it into a code branch that checks the value of lex_level
is within the correct bounds.

Bug reported and diagnosed by Piotr Stefaniak.

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/40a50a17b905dae233ddb8bb36b7deff9e3abb16

Modified Files
--------------
src/backend/utils/adt/jsonfuncs.c |   26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Only adjust negative indexes in json_get up to the length of the
@ 2015-07-28 21:59  Andrew Dunstan <andrew@dunslane.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Andrew Dunstan @ 2015-07-28 21:59 UTC (permalink / raw)
  To: pgsql-committers

Only adjust negative indexes in json_get up to the length of the path.

The previous code resulted in memory access beyond the path bounds. The
cure is to move it into a code branch that checks the value of lex_level
is within the correct bounds.

Bug reported and diagnosed by Piotr Stefaniak.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/6d10f4e9d7f0051afb60c42409f2fe61cf4da348

Modified Files
--------------
src/backend/utils/adt/jsonfuncs.c |   26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2015-07-28 21:59 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-07-28 21:59 pgsql: Only adjust negative indexes in json_get up to the length of the Andrew Dunstan <andrew@dunslane.net>
2015-07-28 21:59 pgsql: Only adjust negative indexes in json_get up to the length of the Andrew Dunstan <andrew@dunslane.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox