Module: kamailio Branch: master Commit: 4dc7b49f6b80305dc7c44d3dc95028ae282568ac URL: https://github.com/kamailio/kamailio/commit/4dc7b49f6b80305dc7c44d3dc95028ae...
Author: Victor Seva linuxmaniac@torreviejawireless.org Committer: Victor Seva linuxmaniac@torreviejawireless.org Date: 2020-07-01T11:18:39+02:00
pv_headers: pvh_set_header() fix core if $xavi not found
---
Modified: src/modules/pv_headers/pvh_xavp.c
---
Diff: https://github.com/kamailio/kamailio/commit/4dc7b49f6b80305dc7c44d3dc95028ae... Patch: https://github.com/kamailio/kamailio/commit/4dc7b49f6b80305dc7c44d3dc95028ae...
---
diff --git a/src/modules/pv_headers/pvh_xavp.c b/src/modules/pv_headers/pvh_xavp.c index fa8ba791e3..ad5ba9ddac 100644 --- a/src/modules/pv_headers/pvh_xavp.c +++ b/src/modules/pv_headers/pvh_xavp.c @@ -603,7 +603,10 @@ int pvh_set_header( 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) {