pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Tighten pg_get_object_address argument checking
2+ messages / 1 participants
[nested] [flat]

* pgsql: Tighten pg_get_object_address argument checking
@ 2022-09-21 13:54  Peter Eisentraut <peter@eisentraut.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Eisentraut @ 2022-09-21 13:54 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Tighten pg_get_object_address argument checking

For publication schemas (OBJECT_PUBLICATION_NAMESPACE) and user
mappings (OBJECT_USER_MAPPING), pg_get_object_address() checked the
array length of the second argument, but not of the first argument.
If the first argument was too long, it would just silently ignore
everything but the first argument.  Fix that by checking the length of
the first argument as well.

Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/caaef70b-a874-1088-92ef-5ac38269c33b%40enterprisedb.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2da8c4cff39328897aa716a0ba57bdada5aeaf6e

Modified Files
--------------
src/backend/catalog/objectaddress.c          | 10 ++++++++--
src/test/regress/expected/object_address.out | 16 +++++++++++-----
src/test/regress/sql/object_address.sql      |  2 +-
3 files changed, 20 insertions(+), 8 deletions(-)



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

* pgsql: Tighten pg_get_object_address argument checking
@ 2022-09-21 13:54  Peter Eisentraut <peter@eisentraut.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Eisentraut @ 2022-09-21 13:54 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Tighten pg_get_object_address argument checking

For publication schemas (OBJECT_PUBLICATION_NAMESPACE) and user
mappings (OBJECT_USER_MAPPING), pg_get_object_address() checked the
array length of the second argument, but not of the first argument.
If the first argument was too long, it would just silently ignore
everything but the first argument.  Fix that by checking the length of
the first argument as well.

Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/caaef70b-a874-1088-92ef-5ac38269c33b%40enterprisedb.com

Branch
------
REL_15_STABLE

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

Modified Files
--------------
src/backend/catalog/objectaddress.c          | 10 ++++++++--
src/test/regress/expected/object_address.out | 16 +++++++++++-----
src/test/regress/sql/object_address.sql      |  2 +-
3 files changed, 20 insertions(+), 8 deletions(-)



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


end of thread, other threads:[~2022-09-21 13:54 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-09-21 13:54 pgsql: Tighten pg_get_object_address argument checking Peter Eisentraut <peter@eisentraut.org>
2022-09-21 13:54 pgsql: Tighten pg_get_object_address argument checking Peter Eisentraut <peter@eisentraut.org>

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