Browse code

msrp: check return code for str explode

(cherry picked from commit addb6a88d0266a0bb0545077fb0b5b8a3fdcca8e)

Daniel-Constantin Mierla authored on 29/04/2021 04:56:50
Showing 1 changed files
... ...
@@ -716,6 +716,11 @@ int msrp_parse_hdr_uri_list(msrp_hdr_t *hdr)
716 716
 	s = hdr->body;
717 717
 	trim(&s);
718 718
 	arr->size = msrp_explode_strz(&arr->list, &s, " ");
719
+	if(arr->size<0)
720
+	{
721
+		LM_ERR("failed to explode\n");
722
+		return -1;
723
+	}
719 724
 	hdr->parsed.flags |= MSRP_DATA_SET;
720 725
 	hdr->parsed.free_fn = msrp_str_array_destroy;
721 726
 	hdr->parsed.data = arr;