pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: In array_position()/array_positions(), beware of empty input arr
6+ messages / 1 participants
[nested] [flat]

* pgsql: In array_position()/array_positions(), beware of empty input arr
@ 2023-05-04 15:48  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2023-05-04 15:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

In array_position()/array_positions(), beware of empty input array.

These functions incautiously fetched the array's first lower bound
even when the array is zero-dimensional, thus fetching the word
after the allocated array space.  While almost always harmless,
with very bad luck this could result in SIGSEGV.  Fix by adding
an early exit for empty input.

Per bug #17920 from Alexander Lakhin.

Discussion: https://postgr.es/m/17920-f7c228c627b6d02e%40postgresql.org

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/9a72f499a4b61c34e3ae7759c209e92e0cfef6e1

Modified Files
--------------
src/backend/utils/adt/array_userfuncs.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)



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

* pgsql: In array_position()/array_positions(), beware of empty input arr
@ 2023-05-04 15:48  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2023-05-04 15:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

In array_position()/array_positions(), beware of empty input array.

These functions incautiously fetched the array's first lower bound
even when the array is zero-dimensional, thus fetching the word
after the allocated array space.  While almost always harmless,
with very bad luck this could result in SIGSEGV.  Fix by adding
an early exit for empty input.

Per bug #17920 from Alexander Lakhin.

Discussion: https://postgr.es/m/17920-f7c228c627b6d02e%40postgresql.org

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/4624aad61a313520d6542a210680088cec644dca

Modified Files
--------------
src/backend/utils/adt/array_userfuncs.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)



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

* pgsql: In array_position()/array_positions(), beware of empty input arr
@ 2023-05-04 15:48  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2023-05-04 15:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

In array_position()/array_positions(), beware of empty input array.

These functions incautiously fetched the array's first lower bound
even when the array is zero-dimensional, thus fetching the word
after the allocated array space.  While almost always harmless,
with very bad luck this could result in SIGSEGV.  Fix by adding
an early exit for empty input.

Per bug #17920 from Alexander Lakhin.

Discussion: https://postgr.es/m/17920-f7c228c627b6d02e%40postgresql.org

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d5de344a50d3fa03fad38fe41cc3443db4143bb5

Modified Files
--------------
src/backend/utils/adt/array_userfuncs.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)



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

* pgsql: In array_position()/array_positions(), beware of empty input arr
@ 2023-05-04 15:48  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2023-05-04 15:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

In array_position()/array_positions(), beware of empty input array.

These functions incautiously fetched the array's first lower bound
even when the array is zero-dimensional, thus fetching the word
after the allocated array space.  While almost always harmless,
with very bad luck this could result in SIGSEGV.  Fix by adding
an early exit for empty input.

Per bug #17920 from Alexander Lakhin.

Discussion: https://postgr.es/m/17920-f7c228c627b6d02e%40postgresql.org

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/ccb479e76ac3032ef942f5d4f6a3ab742c2db03e

Modified Files
--------------
src/backend/utils/adt/array_userfuncs.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)



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

* pgsql: In array_position()/array_positions(), beware of empty input arr
@ 2023-05-04 15:48  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2023-05-04 15:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

In array_position()/array_positions(), beware of empty input array.

These functions incautiously fetched the array's first lower bound
even when the array is zero-dimensional, thus fetching the word
after the allocated array space.  While almost always harmless,
with very bad luck this could result in SIGSEGV.  Fix by adding
an early exit for empty input.

Per bug #17920 from Alexander Lakhin.

Discussion: https://postgr.es/m/17920-f7c228c627b6d02e%40postgresql.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4c40995f61227c579bd7269a829c00013ac66492

Modified Files
--------------
src/backend/utils/adt/array_userfuncs.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)



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

* pgsql: In array_position()/array_positions(), beware of empty input arr
@ 2023-05-04 15:48  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2023-05-04 15:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

In array_position()/array_positions(), beware of empty input array.

These functions incautiously fetched the array's first lower bound
even when the array is zero-dimensional, thus fetching the word
after the allocated array space.  While almost always harmless,
with very bad luck this could result in SIGSEGV.  Fix by adding
an early exit for empty input.

Per bug #17920 from Alexander Lakhin.

Discussion: https://postgr.es/m/17920-f7c228c627b6d02e%40postgresql.org

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/580df507896351a0ebb5a09c2c84c0eac7b6740f

Modified Files
--------------
src/backend/utils/adt/array_userfuncs.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)



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


end of thread, other threads:[~2023-05-04 15:48 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-05-04 15:48 pgsql: In array_position()/array_positions(), beware of empty input arr Tom Lane <tgl@sss.pgh.pa.us>
2023-05-04 15:48 pgsql: In array_position()/array_positions(), beware of empty input arr Tom Lane <tgl@sss.pgh.pa.us>
2023-05-04 15:48 pgsql: In array_position()/array_positions(), beware of empty input arr Tom Lane <tgl@sss.pgh.pa.us>
2023-05-04 15:48 pgsql: In array_position()/array_positions(), beware of empty input arr Tom Lane <tgl@sss.pgh.pa.us>
2023-05-04 15:48 pgsql: In array_position()/array_positions(), beware of empty input arr Tom Lane <tgl@sss.pgh.pa.us>
2023-05-04 15:48 pgsql: In array_position()/array_positions(), beware of empty input arr Tom Lane <tgl@sss.pgh.pa.us>

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