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

Commit

Permalink
Merge pull request #62 from NesoK/_extract_record-patch
Browse files Browse the repository at this point in the history
GeoIP_record_by_addr leads to a core dump on an empty database for 127.0.0.1
  • Loading branch information
oschwald committed Jul 13, 2015
2 parents a80a149 + 032ab8d commit 36a5b8a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libGeoIP/GeoIPCity.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ _extract_record(GeoIP * gi, unsigned int seek_record, int *next_record_ptr)
return NULL;
}
}else {
if (gi->size <= record_pointer) {
/* such record does not exists in the cache */
return NULL;
}
record_buf = gi->cache + (long)record_pointer;
}

Expand Down

0 comments on commit 36a5b8a

Please sign in to comment.