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

geoip: safety check to see if the result structure is filled

- return $null if not
- reported by Juha Heinanen
Daniel-Constantin Mierla 11 жил өмнө
parent
commit
721ffe3576

+ 2 - 0
modules/geoip/geoip_pv.c

@@ -247,6 +247,8 @@ int pv_get_geoip(struct sip_msg *msg, pv_param_t *param,
 	gpv = (geoip_pv_t*)param->pvn.u.dname;
 	if(gpv==NULL)
 		return -1;
+	if(gpv->item==NULL)
+		return pv_get_null(msg, param, res);
 
 	switch(gpv->type)
 	{