Module: kamailio
Branch: 4.3
Commit: 4c24d4acbca4e5ec99b5de1dd5f29d2cdeae9e2b
URL:
https://github.com/kamailio/kamailio/commit/4c24d4acbca4e5ec99b5de1dd5f29d2…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-08-28T12:34:40+02:00
geoip: set null termination to the field used for query
(cherry picked from commit ec2a72d75dc0a2c9c3d88361094fdda7a7477935)
---
Modified: modules/geoip/geoip_pv.c
---
Diff:
https://github.com/kamailio/kamailio/commit/4c24d4acbca4e5ec99b5de1dd5f29d2…
Patch:
https://github.com/kamailio/kamailio/commit/4c24d4acbca4e5ec99b5de1dd5f29d2…
---
diff --git a/modules/geoip/geoip_pv.c b/modules/geoip/geoip_pv.c
index 46c4dff..ba12f16 100644
--- a/modules/geoip/geoip_pv.c
+++ b/modules/geoip/geoip_pv.c
@@ -422,7 +422,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);