forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit26ec6b5
committed
Avoid invalid alloc size error in shm_mq
In shm_mq_receive(), a huge payload could trigger an unjustified"invalid memory alloc request size" error due to the way the buffersize is increased.Add error checks (documenting the upper limit) and avoid the error bylimiting the allocation size to MaxAllocSize.Author: Markus Wanner <markus.wanner@2ndquadrant.com>Discussion:https://www.postgresql.org/message-id/flat/3bb363e7-ac04-0ac4-9fe8-db1148755bfa%402ndquadrant.com1 parentafa0d53 commit26ec6b5
1 file changed
+24
-0
lines changedLines changed: 24 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
24 | 24 |
| |
25 | 25 |
| |
26 | 26 |
| |
| 27 | + | |
27 | 28 |
| |
28 | 29 |
| |
29 | 30 |
| |
| |||
360 | 361 |
| |
361 | 362 |
| |
362 | 363 |
| |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
363 | 371 |
| |
364 | 372 |
| |
365 | 373 |
| |
| |||
675 | 683 |
| |
676 | 684 |
| |
677 | 685 |
| |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
678 | 697 |
| |
679 | 698 |
| |
680 | 699 |
| |
| |||
703 | 722 |
| |
704 | 723 |
| |
705 | 724 |
| |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
706 | 729 |
| |
707 | 730 |
| |
| 731 | + | |
708 | 732 |
| |
709 | 733 |
| |
710 | 734 |
| |
|
0 commit comments
Comments
(0)