Change #8041
Category | None |
Changed by | kenstir <kenstir | @gmail.com>
Changed at | Fri 17 Sep 2021 13:37:21 |
Repository | git://git.evergreen-ils.org/OpenSRF.git |
Project | OpenSRF |
Branch | master |
Revision | a3368f99d7711df7f9dd446161417cd17a73a3bc |
Comments
Fix LP#1883169 by using growing_buffer When presented with an error message that has more than 32 characters that need to be escaped, the gateway fails to reserve enough space in the memory allocation it uses to build the JSON message. Instead of guessing at how much space will be needed, and failing for some messages, this commit uses growing_buffer to build the JSON. growing_buffer is limited to 10Mb, so while large messages could be generated, they won't cause an OOM on the server side. Signed-off-by: Ken Cox <kenstir@gmail.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Changed files
- src/gateway/osrf_json_gateway.c