Browse code

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

- return $null if not
- reported by Juha Heinanen

(cherry picked from commit 721ffe3576e8e7891c27f8578eb244a857ede759)

Daniel-Constantin Mierla authored on 27/02/2014 07:48:42
Showing 1 changed files
... ...
@@ -247,6 +247,8 @@ int pv_get_geoip(struct sip_msg *msg, pv_param_t *param,
247 247
 	gpv = (geoip_pv_t*)param->pvn.u.dname;
248 248
 	if(gpv==NULL)
249 249
 		return -1;
250
+	if(gpv->item==NULL)
251
+		return pv_get_null(msg, param, res);
250 252
 
251 253
 	switch(gpv->type)
252 254
 	{