From 22d8aa061a70cd2b8369c64b65b2285b824d3528 Mon Sep 17 00:00:00 2001 From: Andreas Granig Date: Mon, 28 May 2018 10:05:10 +0200 Subject: [PATCH] TT#37389 Backport kamailio RLS buffer fix Change-Id: Ie5fc7821ef5a071f013a9f6630af393f7bf53b60 --- debian/patches/series | 1 + debian/patches/sipwise/rls_fix_buffer.patch | 23 +++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 debian/patches/sipwise/rls_fix_buffer.patch diff --git a/debian/patches/series b/debian/patches/series index b4c77b0b8..614f53a1b 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -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 diff --git a/debian/patches/sipwise/rls_fix_buffer.patch b/debian/patches/sipwise/rls_fix_buffer.patch new file mode 100644 index 000000000..3e1e8da52 --- /dev/null +++ b/debian/patches/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");