Module: sip-router
Branch: master
Commit: 721ffe3576e8e7891c27f8578eb244a857ede759
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=721ffe3…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu Feb 27 08:48:42 2014 +0100
geoip: safety check to see if the result structure is filled
- return $null if not
- reported by Juha Heinanen
---
modules/geoip/geoip_pv.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/modules/geoip/geoip_pv.c b/modules/geoip/geoip_pv.c
index 06b09f0..8aa5222 100644
--- a/modules/geoip/geoip_pv.c
+++ b/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)
{