postgresql/contrib/pg_freespacemap
Michael Paquier e0c3d5122e pg_freespacemap: Fix declaration of pg_freespace(regclass)
This function called generate_series() without enforcing its input
argument types, making possible for an attacker to catch this call, by
defining for example a generate_series(int,bigint).

The internals of pg_freespace(regclass) are changed to force the use of
bigint for the inputs of generate_series().  A more consistent style is
applied for all its hardcoded values, while on it.

Issue introduced in 3f323eba89.

Reported-by: Noah Misch
Reviewed-by: Noah Misch
Discussion: https://postgr.es/m/20250106190428.ec.nmisch@google.com
2025-01-08 13:16:43 +09:00
..
expected
sql
.gitignore
Makefile pg_freespacemap: Use SQL-standard function bodies 2024-11-12 17:28:03 +09:00
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00
pg_freespacemap--1.0--1.1.sql
pg_freespacemap--1.1--1.2.sql
pg_freespacemap--1.1.sql
pg_freespacemap--1.2--1.3.sql pg_freespacemap: Fix declaration of pg_freespace(regclass) 2025-01-08 13:16:43 +09:00
pg_freespacemap.c Remove unused #include's from contrib, pl, test .c files 2024-10-28 08:02:17 +01:00
pg_freespacemap.conf
pg_freespacemap.control pg_freespacemap: Use SQL-standard function bodies 2024-11-12 17:28:03 +09:00