Module: kamailio Branch: master Commit: 17e7d757b04b6da5b5d4d2eb076ac746fcc0ee05 URL: https://github.com/kamailio/kamailio/commit/17e7d757b04b6da5b5d4d2eb076ac746...
Author: Hugh Waite hugh.waite@xura.com Committer: Hugh Waite hugh.waite@xura.com Date: 2016-02-16T17:25:14Z
pv: Fix crash when xavp has no attributes - Fixes the crash reported in #511
---
Modified: modules/pv/pv_xavp.c
---
Diff: https://github.com/kamailio/kamailio/commit/17e7d757b04b6da5b5d4d2eb076ac746... Patch: https://github.com/kamailio/kamailio/commit/17e7d757b04b6da5b5d4d2eb076ac746...
---
diff --git a/modules/pv/pv_xavp.c b/modules/pv/pv_xavp.c index 8c11426..67ffd45 100644 --- a/modules/pv/pv_xavp.c +++ b/modules/pv/pv_xavp.c @@ -111,6 +111,8 @@ int pv_get_xavp(struct sip_msg *msg, pv_param_t *param, return pv_get_null(msg, param, res); if(xname->next==NULL) return pv_xavp_get_value(msg, param, res, avp); + if(avp->val.type != SR_XTYPE_XAVP) + return pv_get_null(msg, param, res);
idx = 0; idxf = 0;