forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9ed87a7
committed
Fix read beyond buffer bug introduced by the split xlog.c patch.
FinishWalRecovery() copied the valid part of the last WAL block into apalloc'd buffer, and the code in StartupXLOG() copied it to the WALbuffer. But the memcpy in StartupXLOG() copied a full 8kB block, notjust the valid part, i.e. it copied from beyond the end of the buffer.The invalid part was cleared immediately afterwards, so as long as thememory was allocated and didn't segfault, it didn't do any harm, butit can definitely segfault.Discussion:https://www.postgresql.org/message-id/efc12e32-5af2-3485-5b1d-5af9f707491a@iki.fi1 parent2549f06 commit9ed87a7
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5454 | 5454 |
| |
5455 | 5455 |
| |
5456 | 5456 |
| |
5457 |
| - | |
| 5457 | + | |
5458 | 5458 |
| |
5459 | 5459 |
| |
5460 | 5460 |
| |
|
0 commit comments
Comments
(0)