Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

GeoIP_record_by_addr leads to a core dump on an empty database for 127.0.0.1 #62

Merged
merged 1 commit into from
Jul 13, 2015
Merged

GeoIP_record_by_addr leads to a core dump on an empty database for 127.0.0.1 #62

merged 1 commit into from
Jul 13, 2015

Conversation

AlexK0
Copy link

@AlexK0 AlexK0 commented Jul 8, 2015

How to reproduce:

Open database via

GeoIP *db = GeoIP_open("./filename", GEOIP_MMAP_CACHE) ;

with GEOIP_MMAP_CACHE (or GEOIP_MEMORY_CACHE) options, after that, get a record via ip addr:

GeoIP_record_by_addr (db, "127.0.0.1");

then GeoIP_record_by_addr generates a core dump.

GeoIP_record_by_ipnum and GeoIP_record_by_name generates a core dummp, too.

@oschwald
Copy link
Member

Thanks!

oschwald added a commit that referenced this pull request Jul 13, 2015
GeoIP_record_by_addr leads to a core dump on an empty database for 127.0.0.1
@oschwald oschwald merged commit 36a5b8a into maxmind:master Jul 13, 2015
oschwald added a commit that referenced this pull request Jul 28, 2015
1.6.6

* Replaced usage of deprecated fileno, read, and lseek on Visual Studio 2005+
  with their ISO C++ conformant replacements. (Fix by ClaudiuHKS. GitHub #55.)
* A warning about using a double as a float was fixed. (Fix by ClaudiuHKS.
  GitHub #56.)
* Fixed segfault when doing a lookup on an empty database. (Fix by NesoK.
  GitHub #62.)
* Fixed a memcheck error from valgrind in the `_check_mtime`
  function. (Reported by yurivct. GitHub #60.)
* Fixed `_check_mtime` to check the return value of `gettimeofday` rather than
  just assuming it worked.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants