pg_freespacemap: Fix declaration of pg_freespace(regclass)
Michael Paquier <michael@paquier.xyz>
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 3f323eba89fb. Reported-by: Noah Misch Reviewed-by: Noah Misch Discussion: https://postgr.es/m/20250106190428.ec.nmisch@google.com
Files
| Path | Change | +/− |
|---|---|---|
| contrib/pg_freespacemap/pg_freespacemap--1.2--1.3.sql | modified | +1 −1 |
Discussion
- Converting contrib SQL functions to new style 44 messages · 2021-04-13 → 2025-01-08