Module: kamailio
Branch: master
Commit: 2bb33a88881eacb94e2af54d564cdffc00478cea
URL:
https://github.com/kamailio/kamailio/commit/2bb33a88881eacb94e2af54d564cdff…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-01-10T12:52:27+01:00
pua: safety check on tuple_id len
---
Modified: src/modules/pua/add_events.c
---
Diff:
https://github.com/kamailio/kamailio/commit/2bb33a88881eacb94e2af54d564cdff…
Patch:
https://github.com/kamailio/kamailio/commit/2bb33a88881eacb94e2af54d564cdff…
---
diff --git a/src/modules/pua/add_events.c b/src/modules/pua/add_events.c
index ce94d5a842..79d3aeaedb 100644
--- a/src/modules/pua/add_events.c
+++ b/src/modules/pua/add_events.c
@@ -183,6 +183,10 @@ int pres_process_body(publ_info_t* publ, str** fin_body, int ver,
str** tuple_pa
{
if(tuple== NULL)
{
+ if(strlen(tuple_id)>=50) {
+ LM_ERR("tuple id is too long: %s\n", tuple_id);
+ goto error;
+ }
strcpy(buf, tuple_id);
xmlFree(tuple_id);
tuple_id= buf;