mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-20 00:20:42 +01:00
core: potential misadressing when accessing JSON properties
When a JSON property is accessed in template processing, memory may be misadressed or a double-free may occur while obtaining the propety. This was detected by a Coverty scan.
This commit is contained in:
parent
5838aa6c77
commit
cdc5d6bae9
@ -2998,8 +2998,6 @@ getJSONPropVal(smsg_t * const pMsg, msgPropDescr_t *pProp, uchar **pRes, rs_size
|
|||||||
struct json_object *field;
|
struct json_object *field;
|
||||||
DEFiRet;
|
DEFiRet;
|
||||||
|
|
||||||
if(*pbMustBeFreed)
|
|
||||||
free(*pRes);
|
|
||||||
*pRes = NULL;
|
*pRes = NULL;
|
||||||
|
|
||||||
if(pProp->id == PROP_CEE) {
|
if(pProp->id == PROP_CEE) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user