[sr-dev] git:4.2:0b18aea1: geoip: set null termination to the field used for query
Daniel-Constantin Mierla
miconda at gmail.com
Fri Aug 28 12:35:29 CEST 2015
Module: kamailio
Branch: 4.2
Commit: 0b18aea1f48584a4ee9ce445dfca7c25794c6c73
URL: https://github.com/kamailio/kamailio/commit/0b18aea1f48584a4ee9ce445dfca7c25794c6c73
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at 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/0b18aea1f48584a4ee9ce445dfca7c25794c6c73.diff
Patch: https://github.com/kamailio/kamailio/commit/0b18aea1f48584a4ee9ce445dfca7c25794c6c73.patch
---
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);
More information about the sr-dev
mailing list