Content-Length: 271143 | pFad | http://github.com/postgrespro/postgres_cluster/commit/5485c99e7f507b2849ac675e9c10f34551f645b6

F4 Fix silly nil-pointer-dereference bug introduced in commit d5f6f13f8. · postgrespro/postgres_cluster@5485c99 · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/5485c99e7f507b2849ac675e9c10f34551f645b6

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy