2
0
Эх сурвалжийг харах

pv: Fix crash when xavp has no attributes
- Fixes the crash reported in #511

Hugh Waite 9 жил өмнө
parent
commit
17e7d757b0
1 өөрчлөгдсөн 2 нэмэгдсэн , 0 устгасан
  1. 2 0
      modules/pv/pv_xavp.c

+ 2 - 0
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;