Module: kamailio Branch: master Commit: 4f3129f44186dd4014383c3dcb1e0456f3f67ff1 URL: https://github.com/kamailio/kamailio/commit/4f3129f44186dd4014383c3dcb1e0456f3f67ff1
Author: Daniel-Constantin Mierla <[email protected]> Committer: Daniel-Constantin Mierla <[email protected]> Date: 2026-06-07T14:30:49+02:00 evapi: check parameters for kemi functions --- Modified: src/modules/evapi/evapi_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/4f3129f44186dd4014383c3dcb1e0456f3f67ff1.diff Patch: https://github.com/kamailio/kamailio/commit/4f3129f44186dd4014383c3dcb1e0456f3f67ff1.patch --- diff --git a/src/modules/evapi/evapi_mod.c b/src/modules/evapi/evapi_mod.c index fb4318655b6..65cb0840d09 100644 --- a/src/modules/evapi/evapi_mod.c +++ b/src/modules/evapi/evapi_mod.c @@ -659,6 +659,11 @@ static int ki_evapi_relay(sip_msg_t *msg, str *sdata) { int ret; + if(sdata == NULL || sdata->s == NULL || sdata->len <= 0) { + LM_ERR("invalid data parameter\n"); + return -1; + } + ret = evapi_relay(sdata); if(ret < 0) @@ -817,6 +822,16 @@ static int ki_evapi_relay_unicast(sip_msg_t *msg, str *sdata, str *stag) { int ret; + if(sdata == NULL || sdata->s == NULL || sdata->len <= 0) { + LM_ERR("invalid data parameter\n"); + return -1; + } + + if(stag == NULL || stag->s == NULL || stag->len <= 0) { + LM_ERR("invalid tag parameter\n"); + return -1; + } + ret = evapi_relay_unicast(sdata, stag); if(ret < 0) @@ -832,6 +847,16 @@ static int ki_evapi_relay_multicast(sip_msg_t *msg, str *sdata, str *stag) { int ret; + if(sdata == NULL || sdata->s == NULL || sdata->len <= 0) { + LM_ERR("invalid data parameter\n"); + return -1; + } + + if(stag == NULL || stag->s == NULL || stag->len <= 0) { + LM_ERR("invalid tag parameter\n"); + return -1; + } + ret = evapi_relay_multicast(sdata, stag); if(ret < 0) _______________________________________________ Kamailio - Development Mailing List -- [email protected] To unsubscribe send an email to [email protected] Important: keep the mailing list in the recipients, do not reply only to the sender!
