postgresql/src/backend
Heikki Linnakangas 51fed14d73 Don't get confused if a WAL partial record header has xl_tot_len == 0.
If a WAL record header was split across pages, but xl_tot_len was 0, we
would get confused and conclude that we had already read the whole record,
and proceed to CRC check it. That can lead to a crash in RecordIsValid(),
which isn't careful to not read beyond end-of-record, as defined by
xl_tot_len.

Add an explicit sanity check for xl_tot_len <= SizeOfXlogRecord. Also,
make RecordIsValid() more robust by checking in each step that it doesn't
try to access memory beyond end of record, even if a length field in the
record's or a backup block's header is bogus.

Per report and analysis by Tom Lane.
2012-08-20 19:58:21 +03:00
..
access Don't get confused if a WAL partial record header has xl_tot_len == 0. 2012-08-20 19:58:21 +03:00
bootstrap Fix management of pendingOpsTable in auxiliary processes. 2012-07-18 15:28:10 -04:00
catalog Make use of LATERAL in information_schema.sequences view. 2012-08-18 16:14:57 -04:00
commands Disallow extensions from owning the schema they are assigned to. 2012-08-15 11:28:03 -04:00
executor Fix rescan logic in nodeCtescan. 2012-08-15 19:02:33 -04:00
foreign Add GetForeignColumnOptions() to foreign.c, and add some documentation. 2012-03-07 18:20:58 -05:00
lib Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
libpq Support having multiple Unix-domain sockets per postmaster. 2012-08-10 17:27:15 -04:00
main Unify calling conventions for postgres/postmaster sub-main functions 2012-06-25 21:30:12 +03:00
nodes Implement SQL-standard LATERAL subqueries. 2012-08-07 19:02:54 -04:00
optimizer Remove obsolete comment. 2012-08-19 15:25:43 -04:00
parser Allow OLD and NEW in multi-row VALUES within rules. 2012-08-19 14:12:16 -04:00
po Translation updates 2011-08-17 14:07:46 +03:00
port Remove misleading hints about reducing the System V request size. 2012-07-03 10:07:47 -04:00
postmaster Update overlooked comment. 2012-08-10 17:36:54 -04:00
regex Prevent corner-case core dump in rfree(). 2012-07-15 13:27:54 -04:00
replication Turn off WalSender keepalives by default, users can enable if desired 2012-08-09 17:07:03 +01:00
rewrite Centralize the logic for detecting misplaced aggregates, window funcs, etc. 2012-08-10 11:36:15 -04:00
snowball Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
storage Only allow autovacuum to be auto-canceled by a directly blocked process. 2012-07-26 14:29:22 -04:00
tcop Support having multiple Unix-domain sockets per postmaster. 2012-08-10 17:27:15 -04:00
tsearch Make new event trigger facility actually do something. 2012-07-20 11:39:01 -04:00
utils Allow OLD and NEW in multi-row VALUES within rules. 2012-08-19 14:12:16 -04:00
.gitignore Add gitignore for mingw/cygwin build outputs 2011-06-09 18:11:47 +02:00
common.mk Call check_keywords.pl in maintainer-check 2012-02-27 13:53:12 +02:00
Makefile Fix incorrect make maintainer-clean rule. 2012-04-07 18:16:50 -04:00
nls.mk Sort file list when creating gettext-files 2011-12-27 20:20:56 +02:00