TT#37389 Backport kamailio RLS buffer fix

Change-Id: Ie5fc7821ef5a071f013a9f6630af393f7bf53b60
changes/54/21454/1
Andreas Granig 8 years ago
parent c06e6ca086
commit 22d8aa061a

@ -35,3 +35,4 @@ sipwise/rtpengine-balancing.patch
# backport from kamailio 5.1.3
sipwise/0001-topos-reuse-uuid-for-requests-withing-dialog.patch
sipwise/0002-core-improve-to-header-check-guards-str-consists-of-.patch
sipwise/rls_fix_buffer.patch

@ -0,0 +1,23 @@
Index: kamailio/src/modules/rls/subscribe.c
===================================================================
--- kamailio.orig/src/modules/rls/subscribe.c
+++ kamailio/src/modules/rls/subscribe.c
@@ -978,6 +978,8 @@ int send_resource_subs(char* uri, void*
pres_uri.len, pres_uri.s);
return -1;
}
+ LM_DBG("pres uri [%.*s] - normalized uri [%.*s]\n",
+ pres_uri.len, pres_uri.s, normalized_uri->len, normalized_uri->s);
if (parse_uri(normalized_uri->s, normalized_uri->len, &parsed_pres_uri)
< 0) {
@@ -1009,7 +1011,8 @@ int send_resource_subs(char* uri, void*
LM_ERR("out of private memory\n");
return -1;
}
- if ((tmp_str->s = (char *)pkg_malloc(sizeof(char) * pres_uri.len)) == NULL)
+ if ((tmp_str->s = (char *)pkg_malloc(sizeof(char)
+ * normalized_uri->len)) == NULL)
{
pkg_free(tmp_str);
LM_ERR("out of private memory\n");
Loading…
Cancel
Save