| From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Avoid invalid alloc size error in shm_mq |
| Date: | 2020-10-20 16:17:10 |
| Message-ID: | E1kUuJy-0002EN-K3@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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 buffer
size is increased.
Add error checks (documenting the upper limit) and avoid the error by
limiting the allocation size to MaxAllocSize.
Author: Markus Wanner <markus(dot)wanner(at)2ndquadrant(dot)com>
Discussion: https://www.postgresql.org/message-id/flat/3bb363e7-ac04-0ac4-9fe8-db1148755bfa%402ndquadrant.com
Branch
------
REL9_6_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/d4e654d15467d68c85e05eaaa49291de9f81b3ed
Modified Files
--------------
src/backend/storage/ipc/shm_mq.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2020-10-20 22:23:50 | pgsql: Fix ALTER TABLE .. ENABLE/DISABLE TRIGGER recursion |
| Previous Message | Amit Kapila | 2020-10-20 11:09:49 | Re: pgsql: Change the docs for PARALLEL option of Vacuum. |