Browse code

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)

Daniel-Constantin Mierla authored on 07/06/2022 07:12:40
Showing 1 changed files
... ...
@@ -422,6 +422,11 @@ int pv_set_uac_req(struct sip_msg* msg, pv_param_t *param,
422 422
 				LM_ERR("Invalid value type\n");
423 423
 				return -1;
424 424
 			}
425
+			if(tval->rs.len>=128)
426
+			{
427
+				LM_ERR("Value size too big\n");
428
+				return -1;
429
+			}
425 430
 			memcpy(_uac_req.s_callid.s, tval->rs.s, tval->rs.len);
426 431
 			_uac_req.s_callid.s[tval->rs.len] = '\0';
427 432
 			_uac_req.s_callid.len = tval->rs.len;