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

Commit

Permalink
Fix _extract_record core dump
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandr Korepanov committed Jul 8, 2015
1 parent a80a149 commit 032ab8d
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 032ab8d

Please sign in to comment.