Module: kamailio
Branch: 5.5
Commit: 4694656f12179f9bdc6a5d608c45487d67a3aee0
URL:
https://github.com/kamailio/kamailio/commit/4694656f12179f9bdc6a5d608c45487…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-06-07T09:19:00+02:00
uac: check new callid value for setting $uac_req() field
- GH #3135
(cherry picked from commit 0eeb4cc61f4a340ef5f8d4acf1d4ea20eb711f73)
(cherry picked from commit 69b4b6222edd43a935524e69497c1e7ab1148488)
---
Modified: src/modules/uac/uac_send.c
---
Diff:
https://github.com/kamailio/kamailio/commit/4694656f12179f9bdc6a5d608c45487…
Patch:
https://github.com/kamailio/kamailio/commit/4694656f12179f9bdc6a5d608c45487…
---
diff --git a/src/modules/uac/uac_send.c b/src/modules/uac/uac_send.c
index d906a1c27f..0161f667ed 100644
--- a/src/modules/uac/uac_send.c
+++ b/src/modules/uac/uac_send.c
@@ -422,6 +422,11 @@ int pv_set_uac_req(struct sip_msg* msg, pv_param_t *param,
LM_ERR("Invalid value type\n");
return -1;
}
+ if(tval->rs.len>=128)
+ {
+ LM_ERR("Value size too big\n");
+ return -1;
+ }
memcpy(_uac_req.s_callid.s, tval->rs.s, tval->rs.len);
_uac_req.s_callid.s[tval->rs.len] = '\0';
_uac_req.s_callid.len = tval->rs.len;