diff options
author | Alexander Korotkov <akorotkov@postgresql.org> | 2025-02-05 00:15:17 +0200 |
---|---|---|
committer | Alexander Korotkov <akorotkov@postgresql.org> | 2025-02-05 00:45:49 +0200 |
commit | ff1975ddd0270703306dee56601b17742d0934b6 (patch) | |
tree | 88888782691d7c8e9367d0a07120e72f7f363d51 /src/backend/executor/nodeModifyTable.c | |
parent | 627d63419e22054551327216d2b2de3e6977fade (diff) | |
download | postgresql-ff1975ddd0270703306dee56601b17742d0934b6.tar.gz postgresql-ff1975ddd0270703306dee56601b17742d0934b6.zip |
pg_controldata: Fix possible errors on corrupted pg_control
Protect against malformed timestamps. Also protect against negative WalSegSz
as it triggers division by zero:
((0x100000000UL) / (WalSegSz)) can turn into zero in
XLogFileName(xlogfilename, ControlFile->checkPointCopy.ThisTimeLineID,
segno, WalSegSz);
because if WalSegSz is -1 then by arithmetic rules in C we get
0x100000000UL / 0xFFFFFFFFFFFFFFFFUL == 0.
Author: Ilyasov Ian <ianilyasov@outlook.com>
Author: Anton Voloshin <a.voloshin@postgrespro.ru>
Backpatch-through: 13
Diffstat (limited to 'src/backend/executor/nodeModifyTable.c')
0 files changed, 0 insertions, 0 deletions