aboutsummaryrefslogtreecommitdiff
path: root/src/fe_utils/string_utils.c
diff options
context:
space:
mode:
authorAlexander Korotkov <akorotkov@postgresql.org>2025-02-05 00:15:17 +0200
committerAlexander Korotkov <akorotkov@postgresql.org>2025-02-05 00:46:06 +0200
commitc24311c1fed18ebdf0e64f31a8cd86cd3232657b (patch)
tree3309bfc8d1ac7fb87d3b2063a9fd3bb22bda76b7 /src/fe_utils/string_utils.c
parentd6ea82f5da181eb4278595d7dca601568deeed5e (diff)
downloadpostgresql-c24311c1fed18ebdf0e64f31a8cd86cd3232657b.tar.gz
postgresql-c24311c1fed18ebdf0e64f31a8cd86cd3232657b.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/fe_utils/string_utils.c')
0 files changed, 0 insertions, 0 deletions