aboutsummaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
authorAmit Kapila <akapila@postgresql.org>2023-12-01 10:14:36 +0530
committerAmit Kapila <akapila@postgresql.org>2023-12-01 10:22:13 +0530
commitf66fcc5cd616da8d81a2d2f9b80a9f080796f4b6 (patch)
tree6a6b9dad90f38c9e1c979407b7dd44ac45c7e2f1 /src/backend
parentaa11a9c14902b7bcb1d73533a0403dc50361112a (diff)
downloadpostgresql-f66fcc5cd616da8d81a2d2f9b80a9f080796f4b6.tar.gz
postgresql-f66fcc5cd616da8d81a2d2f9b80a9f080796f4b6.zip
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
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/access/hash/hash_xlog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/access/hash/hash_xlog.c b/src/backend/access/hash/hash_xlog.c
index 40debf40288..f1e233a8173 100644
--- a/src/backend/access/hash/hash_xlog.c
+++ b/src/backend/access/hash/hash_xlog.c
@@ -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;