pgsql: Robustify pg_column_is_updatable() against overly large attnums
pgsql: Robustify pg_column_is_updatable() against overly large attnums
От:
David Rowley <drowley@postgresql.org>
Дата:
Robustify pg_column_is_updatable() against overly large attnums Passing an attnum sufficiently close to PG_INT16_MAX could wrap AttrNumber when offsetting for FirstLowInvalidHeapAttributeNumber, leading to an attempt to build a Bitmapset with a negative member value resulting in an ERROR, rather than returning the result as it would for other nonexistent columns. Upgrade the type used to 32-bit to avoid this issue. Bug: #19904 Reported-by: Zheng Hacker Discussion: https://postgr.es/m/19904-57a44a8aa7638ae4@postgresql.org Backpatch-through: 15 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/79a9240c6f1394dc10ae40c75b89a9c77934ed73 Modified Files -------------- src/backend/utils/adt/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)