From bf598c3ec6c662d29184a8b2e26edf09ce23c84e Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Tue, 30 Jun 2020 19:59:36 +0200 Subject: [PATCH] TT#84599 pv_headers: fix coredump when no more shm is left Change-Id: I356f82e44712091c381f30bb3273136dd0069d02 --- debian/patches/sipwise/add_pv_headers_module.patch | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/debian/patches/sipwise/add_pv_headers_module.patch b/debian/patches/sipwise/add_pv_headers_module.patch index 97d8b0b3c..2052880df 100644 --- a/debian/patches/sipwise/add_pv_headers_module.patch +++ b/debian/patches/sipwise/add_pv_headers_module.patch @@ -21,9 +21,9 @@ Subject: add_pv_headers_module src/modules/pv_headers/pvh_hdr.h | 47 + src/modules/pv_headers/pvh_str.c | 146 +++ src/modules/pv_headers/pvh_str.h | 40 + - src/modules/pv_headers/pvh_xavp.c | 1155 +++++++++++++++++++++++ + src/modules/pv_headers/pvh_xavp.c | 1158 +++++++++++++++++++++++ src/modules/pv_headers/pvh_xavp.h | 62 ++ - 20 files changed, 3754 insertions(+), 1 deletion(-) + 20 files changed, 3757 insertions(+), 1 deletion(-) create mode 100644 src/modules/pv_headers/Makefile create mode 100644 src/modules/pv_headers/README create mode 100644 src/modules/pv_headers/doc/Makefile @@ -2701,10 +2701,10 @@ index 0000000..10aa216 \ No newline at end of file diff --git a/src/modules/pv_headers/pvh_xavp.c b/src/modules/pv_headers/pvh_xavp.c new file mode 100644 -index 0000000..03bcaf1 +index 0000000..4cc5a7e --- /dev/null +++ b/src/modules/pv_headers/pvh_xavp.c -@@ -0,0 +1,1155 @@ +@@ -0,0 +1,1158 @@ +/* + * pv_headers + * @@ -3310,7 +3310,10 @@ index 0000000..03bcaf1 + return -1; + } + -+ xavi = pvh_get_xavi(msg, &xavi_name); ++ if((xavi = pvh_get_xavi(msg, &xavi_name) == NULL)) { ++ LM_ERR("xavi %.*s not found\n", xavi_name.len, xavi_name.s); ++ return -1; ++ } + avi = xavi->val.v.xavp; + hname_cnt = xavi_count(hname, &avi); + if(hname_cnt == 0) {