From a543db5dc66724cd28e28aaa0fefc233ba11a823 Mon Sep 17 00:00:00 2001 From: Arkshine Date: Tue, 6 Jan 2015 22:36:14 +0100 Subject: [PATCH] Geoip: Fix possible crash --- dlls/geoip/geoip_util.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/geoip/geoip_util.cpp b/dlls/geoip/geoip_util.cpp index aecdb864..ca6685b4 100644 --- a/dlls/geoip/geoip_util.cpp +++ b/dlls/geoip/geoip_util.cpp @@ -73,10 +73,10 @@ bool lookupByIp(const char *ip, const char **path, MMDB_entry_data_s *result) // Dirty fall back to default language ("en") in case provided user's language is not localized. // Searh "names" position. - while (strcmp(path[i++], "names")); + while (path[i] && strcmp(path[i++], "names")); // No localized entry or we use already default language. - if (!*path[i] || !strcmp(path[i], "en")) + if (!path[i] || !strcmp(path[i], "en")) { return false; }