CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2023/05/23 06:41:29
Modified files:
lib/libutil : imsg-buffer.c
Log message:
Avoid calling malloc with a zero length argument.
ibuf_open() will return an error in this case while ibuf_dynamic() accepts
a 0 len argument and just initialized the buffer and length to zero.
A later ibuf_realloc() call will take care of allocating the buffer.
Additionally switch from malloc() to calloc() when allocating the buffer
this way the buffer is initalized and in ibuf_reserve() an addtional
memset() is used to make sure that the reserved data is zeroed.
OK tb@