Module: kamailio
Branch: 5.4
Commit: fb20b043862b5146f4e4ea34e921a334783ad03d
URL:
https://github.com/kamailio/kamailio/commit/fb20b043862b5146f4e4ea34e921a33…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-06-07T09:19:41+02:00
uac: check new callid value for setting $uac_req() field
- GH #3135
(cherry picked from commit 0eeb4cc61f4a340ef5f8d4acf1d4ea20eb711f73)
(cherry picked from commit 69b4b6222edd43a935524e69497c1e7ab1148488)
(cherry picked from commit 4694656f12179f9bdc6a5d608c45487d67a3aee0)
---
Modified: src/modules/uac/uac_send.c
---
Diff:
https://github.com/kamailio/kamailio/commit/fb20b043862b5146f4e4ea34e921a33…
Patch:
https://github.com/kamailio/kamailio/commit/fb20b043862b5146f4e4ea34e921a33…
---
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;