Skip to content

Commit 5485c99

Browse files
committed
Fix silly nil-pointer-dereference bug introduced in commit d5f6f13.
Don't fetch record->xl_info before we've verified that record isn't NULL. Per Coverity. Michael Paquier
1 parent 32416b0 commit 5485c99

File tree

1 file changed

+1
-1
lines changed
  • src/backend/access/transam

1 file changed

+1
-1
lines changed

src/backend/access/transam/xlog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7812,7 +7812,6 @@ ReadCheckpointRecord(XLogReaderState *xlogreader, XLogRecPtr RecPtr,
78127812
}
78137813

78147814
record = ReadRecord(xlogreader, RecPtr, LOG, true);
7815-
info = record->xl_info & ~XLR_INFO_MASK;
78167815

78177816
if (record == NULL)
78187817
{
@@ -7855,6 +7854,7 @@ ReadCheckpointRecord(XLogReaderState *xlogreader, XLogRecPtr RecPtr,
78557854
}
78567855
return NULL;
78577856
}
7857+
info = record->xl_info & ~XLR_INFO_MASK;
78587858
if (info != XLOG_CHECKPOINT_SHUTDOWN &&
78597859
info != XLOG_CHECKPOINT_ONLINE)
78607860
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy