Module: kamailio
Branch: master
Commit: addb6a88d0266a0bb0545077fb0b5b8a3fdcca8e
URL:
https://github.com/kamailio/kamailio/commit/addb6a88d0266a0bb0545077fb0b5b8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-04-29T08:25:49+02:00
msrp: check return code for str explode
---
Modified: src/modules/msrp/msrp_parser.c
---
Diff:
https://github.com/kamailio/kamailio/commit/addb6a88d0266a0bb0545077fb0b5b8…
Patch:
https://github.com/kamailio/kamailio/commit/addb6a88d0266a0bb0545077fb0b5b8…
---
diff --git a/src/modules/msrp/msrp_parser.c b/src/modules/msrp/msrp_parser.c
index 4e5e67e130..7defaf9353 100644
--- a/src/modules/msrp/msrp_parser.c
+++ b/src/modules/msrp/msrp_parser.c
@@ -716,6 +716,11 @@ int msrp_parse_hdr_uri_list(msrp_hdr_t *hdr)
s = hdr->body;
trim(&s);
arr->size = msrp_explode_strz(&arr->list, &s, " ");
+ if(arr->size<0)
+ {
+ LM_ERR("failed to explode\n");
+ return -1;
+ }
hdr->parsed.flags |= MSRP_DATA_SET;
hdr->parsed.free_fn = msrp_str_array_destroy;
hdr->parsed.data = arr;