Blame SOURCES/0001-fix-segfault-in-env-without-libmaxmind.so.patch
|
|
03d06c |
From 2978e6afd68b1e028855e9166af6eff47eb60f41 Mon Sep 17 00:00:00 2001
|
|
|
03d06c |
From: Martin Sehnoutka <msehnout@redhat.com>
|
|
|
03d06c |
Date: Fri, 3 Aug 2018 10:48:12 +0200
|
|
|
03d06c |
Subject: [PATCH] fix segfault in env without libmaxmind.so
|
|
|
03d06c |
|
|
|
03d06c |
---
|
|
|
03d06c |
ipcalc-maxmind.c | 3 +++
|
|
|
03d06c |
1 file changed, 3 insertions(+)
|
|
|
03d06c |
|
|
|
03d06c |
diff --git a/ipcalc-maxmind.c b/ipcalc-maxmind.c
|
|
|
03d06c |
index bb4f495..6f0033b 100644
|
|
|
03d06c |
--- a/ipcalc-maxmind.c
|
|
|
03d06c |
+++ b/ipcalc-maxmind.c
|
|
|
03d06c |
@@ -113,6 +113,9 @@ void geo_ip_lookup(const char *ip, char **country, char **ccode, char **city, ch
|
|
|
03d06c |
int gai_error, mmdb_error, status, coordinates=0;
|
|
|
03d06c |
double latitude, longitude;
|
|
|
03d06c |
|
|
|
03d06c |
+ if (geo_setup() != 0)
|
|
|
03d06c |
+ return;
|
|
|
03d06c |
+
|
|
|
03d06c |
/* Open the system maxmind database with countries */
|
|
|
03d06c |
status = pMMDB_open(MAXMINDDB_LOCATION_COUNTRY, MMDB_MODE_MMAP, &mmdb);
|
|
|
03d06c |
if (MMDB_SUCCESS == status) {
|
|
|
03d06c |
--
|
|
|
03d06c |
2.17.1
|
|
|
03d06c |
|