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:16 +0200 |
commit | f2205448b15e991478e8ba717732fc02b5a55d09 (patch) | |
tree | 83488250fabe80a7306c2ceaea236ca8cb29e118 /src/backend/executor/nodeFunctionscan.c | |
parent | eeaf6891be48ac2940361717525c277a02c97e63 (diff) | |
download | postgresql-f2205448b15e991478e8ba717732fc02b5a55d09.tar.gz postgresql-f2205448b15e991478e8ba717732fc02b5a55d09.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/nodeFunctionscan.c')
0 files changed, 0 insertions, 0 deletions