Module: kamailio Branch: 4.2 Commit: 0b18aea1f48584a4ee9ce445dfca7c25794c6c73 URL: https://github.com/kamailio/kamailio/commit/0b18aea1f48584a4ee9ce445dfca7c25...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2015-08-28T12:35:16+02:00
geoip: set null termination to the field used for query
(cherry picked from commit ec2a72d75dc0a2c9c3d88361094fdda7a7477935) (cherry picked from commit 4c24d4acbca4e5ec99b5de1dd5f29d2cdeae9e2b)
---
Modified: modules/geoip/geoip_pv.c
---
Diff: https://github.com/kamailio/kamailio/commit/0b18aea1f48584a4ee9ce445dfca7c25... Patch: https://github.com/kamailio/kamailio/commit/0b18aea1f48584a4ee9ce445dfca7c25...
---
diff --git a/modules/geoip/geoip_pv.c b/modules/geoip/geoip_pv.c index 60f37ca..bcc982d 100644 --- a/modules/geoip/geoip_pv.c +++ b/modules/geoip/geoip_pv.c @@ -415,7 +415,7 @@ int geoip_update_pv(str *tomatch, str *name) }
strncpy(gr->tomatch, tomatch->s, tomatch->len); - tomatch->s[tomatch->len] = '\0'; + gr->tomatch[tomatch->len] = '\0'; gr->record = GeoIP_record_by_name(_handle_GeoIP, (const char*)gr->tomatch); LM_DBG("attempt to match: %s\n", gr->tomatch);