forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1144ea3
committed
Prevent shm_mq_send from reading uninitialized memory.
shm_mq_send_bytes didn't invariably initialize *bytes_written beforereturning, which would cause shm_mq_send to read from uninitializedmemory and add the value it found there to mqh->mqh_partial_bytes.This could cause the next attempt to send a message via the queue tofail an assertion (if the queue was detached) or copy data from agarbage pointer value into the queue (if non-blocking mode was in use).1 parent250c26b commit1144ea3
1 file changed
+7
-0
lines changedLines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
676 | 676 |
| |
677 | 677 |
| |
678 | 678 |
| |
| 679 | + | |
| 680 | + | |
679 | 681 |
| |
| 682 | + | |
680 | 683 |
| |
681 | 684 |
| |
682 | 685 |
| |
| |||
691 | 694 |
| |
692 | 695 |
| |
693 | 696 |
| |
| 697 | + | |
| 698 | + | |
694 | 699 |
| |
| 700 | + | |
695 | 701 |
| |
696 | 702 |
| |
697 | 703 |
| |
698 | 704 |
| |
699 | 705 |
| |
| 706 | + | |
700 | 707 |
| |
701 | 708 |
| |
702 | 709 |
| |
|
0 commit comments
Comments
(0)