postgresql/src/bin
Alexander Korotkov ff1975ddd0 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
2025-02-05 00:45:49 +02:00
..
initdb initdb: Convert tests to use long options with fat comma style 2025-01-24 15:19:38 +09:00
pg_amcheck pg_amcheck: Fix test failure on Windows with non-existing role 2025-01-27 08:00:19 +09:00
pg_archivecleanup Update copyright for 2025 2025-01-01 11:21:55 -05:00
pg_basebackup Improve TAP tests of pg_basebackup 2025-01-23 15:15:36 +09:00
pg_checksums Improve grammar of options for command arrays in TAP tests 2025-01-22 14:47:13 +09:00
pg_combinebackup Fix grammatical typos around possessive "its" 2025-01-29 14:39:14 +07:00
pg_config Update copyright for 2025 2025-01-01 11:21:55 -05:00
pg_controldata pg_controldata: Fix possible errors on corrupted pg_control 2025-02-05 00:45:49 +02:00
pg_ctl Improve grammar of options for command arrays in TAP tests 2025-01-22 14:47:13 +09:00
pg_dump Rename pubgencols_type to pubgencols in pg_publication. 2025-01-28 10:42:46 +05:30
pg_resetwal Improve grammar of options for command arrays in TAP tests 2025-01-22 14:47:13 +09:00
pg_rewind Improve grammar of options for command arrays in TAP tests 2025-01-22 14:47:13 +09:00
pg_test_fsync Improve grammar of options for command arrays in TAP tests 2025-01-22 14:47:13 +09:00
pg_test_timing Improve grammar of options for command arrays in TAP tests 2025-01-22 14:47:13 +09:00
pg_upgrade Improve grammar of options for command arrays in TAP tests 2025-01-22 14:47:13 +09:00
pg_verifybackup Improve grammar of options for command arrays in TAP tests 2025-01-22 14:47:13 +09:00
pg_waldump Improve grammar of options for command arrays in TAP tests 2025-01-22 14:47:13 +09:00
pg_walsummary Update copyright for 2025 2025-01-01 11:21:55 -05:00
pgbench Return yyparse() result not via global variable 2025-01-24 06:55:39 +01:00
pgevent Update copyright for 2025 2025-01-01 11:21:55 -05:00
psql Avoid breaking SJIS encoding while de-backslashing Windows paths. 2025-01-29 14:24:36 -05:00
scripts vacuumdb: Add missing PQfinish() calls to vacuum_one_database(). 2025-02-04 13:26:57 -06:00
Makefile Update copyright for 2025 2025-01-01 11:21:55 -05:00
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00