diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2012-08-20 19:51:42 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2012-08-20 19:58:21 +0300 |
commit | 51fed14d73ed3acd2282b531fb1396877e44e86a (patch) | |
tree | fa6fb3ca17d6a45dfd2bb088d049f510e6c51ef8 /doc/src | |
parent | 9b2a237cee800ca11fb0415cc5484a46a8c1770d (diff) | |
download | postgresql-51fed14d73ed3acd2282b531fb1396877e44e86a.tar.gz postgresql-51fed14d73ed3acd2282b531fb1396877e44e86a.zip |
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.
Diffstat (limited to 'doc/src')
0 files changed, 0 insertions, 0 deletions