[sr-dev] git:master:2bb33a88: pua: safety check on tuple_id len

Daniel-Constantin Mierla miconda at gmail.com
Wed Jan 10 12:52:53 CET 2018


Module: kamailio
Branch: master
Commit: 2bb33a88881eacb94e2af54d564cdffc00478cea
URL: https://github.com/kamailio/kamailio/commit/2bb33a88881eacb94e2af54d564cdffc00478cea

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at 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/2bb33a88881eacb94e2af54d564cdffc00478cea.diff
Patch: https://github.com/kamailio/kamailio/commit/2bb33a88881eacb94e2af54d564cdffc00478cea.patch

---

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;




More information about the sr-dev mailing list