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:29 +0200 |
commit | f1e0b078b2e3613d28dc10090d35cc3908bbbd09 (patch) | |
tree | af8cdfbdca16e26f5304d604d846878d90c1e65d /src/bin/scripts/dropuser.c | |
parent | 8c2dd212d1bcefa8d2cbcbe53398de367c2d5f63 (diff) | |
download | postgresql-f1e0b078b2e3613d28dc10090d35cc3908bbbd09.tar.gz postgresql-f1e0b078b2e3613d28dc10090d35cc3908bbbd09.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/bin/scripts/dropuser.c')
0 files changed, 0 insertions, 0 deletions