summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2017-04-14 16:52:10 +0200
committerGuy Harris <guy@alum.mit.edu>2017-04-14 17:53:09 +0000
commit74784bdb3ef60d02f6041f6ec6c3b56e3841a2db (patch)
tree472099c4dd8c42c3677e94442bcce2b7abc89f31
parent90afc2582b4cd5a8ae75dcb9f6e19330a28aa5f9 (diff)
downloadwireshark-74784bdb3ef60d02f6041f6ec6c3b56e3841a2db.tar.gz
Update Windows binaries to GeoIP 1.6.10 with a local GeoIP_free function
This solves a crash occurring when trying to free memory allocated by GeoIP (cross-compiled with mingw(32|64)) with MSVC function Bug: 13598 Change-Id: I757cff13660bd485d7ea91d10660e9bf86404728 Reviewed-on: https://code.wireshark.org/review/21090 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r--acinclude.m45
-rw-r--r--cmake/modules/FindGEOIP.cmake1
-rw-r--r--cmakeconfig.h.in3
-rw-r--r--epan/geoip_db.c2
-rw-r--r--tools/win-setup.ps18
5 files changed, 14 insertions, 5 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index ee172ef470..11c657fd87 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1122,6 +1122,11 @@ AC_DEFUN([AC_WIRESHARK_GEOIP_CHECK],
AC_DEFINE(HAVE_GEOIP_V6, 1, [Define if GeoIP supports IPv6 (GeoIP 1.4.5 and later)])
],,
)
+ AC_CHECK_LIB(GeoIP, GeoIP_free,
+ [
+ AC_DEFINE(HAVE_GEOIP_FREE, 1, [Define if GeoIP has GeoIP_free (not available upstream with 1.6.10 or earlier)])
+ ],,
+ )
fi
else
AC_MSG_RESULT(not required)
diff --git a/cmake/modules/FindGEOIP.cmake b/cmake/modules/FindGEOIP.cmake
index ce968b70ef..a8e671f4ce 100644
--- a/cmake/modules/FindGEOIP.cmake
+++ b/cmake/modules/FindGEOIP.cmake
@@ -45,6 +45,7 @@ IF(GEOIP_FOUND)
SET(CMAKE_REQUIRED_INCLUDES ${GEOIP_INCLUDE_DIRS})
SET(CMAKE_REQUIRED_LIBRARIES ${GEOIP_LIBRARIES})
CHECK_FUNCTION_EXISTS("GeoIP_country_name_by_ipnum_v6" HAVE_GEOIP_V6)
+ CHECK_FUNCTION_EXISTS("GeoIP_free" HAVE_GEOIP_FREE)
SET(CMAKE_REQUIRED_INCLUDES "")
SET(CMAKE_REQUIRED_LIBRARIES "")
if (WIN32)
diff --git a/cmakeconfig.h.in b/cmakeconfig.h.in
index 5607a98390..5147c7f1be 100644
--- a/cmakeconfig.h.in
+++ b/cmakeconfig.h.in
@@ -67,6 +67,9 @@
/* Define if GeoIP supports IPv6 (GeoIP 1.4.5 and later) */
#cmakedefine HAVE_GEOIP_V6 1
+/* Define if GeoIP has GeoIP_free (not available upstream with 1.6.10 or earlier) */
+#cmakedefine HAVE_GEOIP_FREE 1
+
/* Define to 1 if you have the <ifaddrs.h> header file. */
#cmakedefine HAVE_IFADDRS_H 1
diff --git a/epan/geoip_db.c b/epan/geoip_db.c
index ee5a3103b2..d4de2ccb99 100644
--- a/epan/geoip_db.c
+++ b/epan/geoip_db.c
@@ -48,7 +48,7 @@
/* This needs to match NUM_GEOIP_COLS in hostlist_table.h */
#define MAX_GEOIP_DBS 13
-#ifndef GeoIP_free
+#ifndef HAVE_GEOIP_FREE
#define GeoIP_free free
#endif
diff --git a/tools/win-setup.ps1 b/tools/win-setup.ps1
index 99fc23b7e3..56f735365d 100644
--- a/tools/win-setup.ps1
+++ b/tools/win-setup.ps1
@@ -99,14 +99,14 @@ Param(
# trouble instead of trying to catch exceptions everywhere.
$ErrorActionPreference = "Stop"
-$Win64CurrentTag = "2017-02-15"
-$Win32CurrentTag = "2017-02-15"
+$Win64CurrentTag = "2017-04-14"
+$Win32CurrentTag = "2017-04-14"
# Archive file / subdir.
$Win64Archives = @{
"AirPcap_Devpack_4_1_0_1622.zip" = "AirPcap_Devpack_4_1_0_1622";
"c-ares-1.12.0-1-win64ws.zip" = "";
- "GeoIP-1.6.6-win64ws.zip" = "GeoIP-1.6.6-win64ws";
+ "GeoIP-1.6.10-win64ws.zip" = "";
"gnutls-3.4.11-1.35-win64ws.zip" = "";
"gtk+-bundle_2.24.23-3.39-2_win64ws.zip" = "gtk2";
"kfw-3-2-2-x64-ws.zip" = "";
@@ -130,7 +130,7 @@ $Win64Archives = @{
$Win32Archives = @{
"AirPcap_Devpack_4_1_0_1622.zip" = "AirPcap_Devpack_4_1_0_1622";
"c-ares-1.12.0-1-win32ws.zip" = "";
- "GeoIP-1.6.6-win32ws.zip" = "GeoIP-1.6.6-win32ws";
+ "GeoIP-1.6.10-win32ws.zip" = "";
"gnutls-3.4.11-1.36-win32ws.zip" = "";
"gtk+-bundle_2.24.23-1.1-1_win32ws.zip" = "gtk2";
"kfw-3-2-2-i386-ws-vc6.zip" = "";