aboutsummaryrefslogtreecommitdiff
path: root/src/include/lib/binaryheap.h
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2024-04-11 13:19:29 +1200
committerThomas Munro <tmunro@postgresql.org>2024-04-11 13:23:45 +1200
commitd8f5acbdb9b22106db583e3cbb177d34e6b18eeb (patch)
treec567875ba8e466a15353760d828406ed5f9a673a /src/include/lib/binaryheap.h
parentf56a9def71bb1d2ccf4fa01a4d1e082c1063d921 (diff)
downloadpostgresql-d8f5acbdb9b22106db583e3cbb177d34e6b18eeb.tar.gz
postgresql-d8f5acbdb9b22106db583e3cbb177d34e6b18eeb.zip
Fix potential stack overflow in incremental backup.
The user can set RELSEG_SIZE to a high number at compile time, so we can't use it to control the size of an array on the stack: it could be many gigabytes in size. On closer inspection, we don't really need that intermediate array anyway. Let's just write directly into the output array, and then perform the absolute->relative adjustment in place. This fixes new code from commit dc212340058. Reviewed-by: Robert Haas <robertmhaas@gmail.com> Discussion: https://postgr.es/m/CA%2BhUKG%2B2hZ0sBztPW4mkLfng0qfkNtAHFUfxOMLizJ0BPmi5%2Bg%40mail.gmail.com
Diffstat (limited to 'src/include/lib/binaryheap.h')
0 files changed, 0 insertions, 0 deletions