1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-19 23:22:23 +03:00

Fix an uninitialized access in hash_xlog_squeeze_page().

Commit 861f86beea changed hash_xlog_squeeze_page() to start reading
the write buffer conditionally but forgot to initialize it leading to an
uninitialized access.

Reported-by: Alexander Lakhin
Author: Hayato Kuroda
Reviewed-by: Alexander Lakhin, Amit Kapila
Discussion: http://postgr.es/m/62ed1a9f-746a-8e86-904b-51b9b806a1d9@gmail.com
This commit is contained in:
Amit Kapila
2023-12-01 10:14:36 +05:30
parent aa11a9c149
commit f66fcc5cd6
3 changed files with 32 additions and 1 deletions

View File

@@ -632,7 +632,7 @@ hash_xlog_squeeze_page(XLogReaderState *record)
XLogRecPtr lsn = record->EndRecPtr;
xl_hash_squeeze_page *xldata = (xl_hash_squeeze_page *) XLogRecGetData(record);
Buffer bucketbuf = InvalidBuffer;
Buffer writebuf;
Buffer writebuf = InvalidBuffer;
Buffer ovflbuf;
Buffer prevbuf = InvalidBuffer;
Buffer mapbuf;