|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2014-10-21 14:48 UTC] slim at inbox dot lv
Description: ------------ in function geoip_record_by_name() after gi = GeoIP_open_type() `gi` must be checked for NULL before gir = GeoIP_record_by_name(gi, hostname); libgeoip does not check gi and segfaults Test script: --------------- any broken /usr/share/GeoIP/GeoIPCity.dat file leads to segfault in libGeoIP Expected result: ---------------- do not crash Actual result: -------------- segfault Patchespatch-geoip-open-type (last revision 2014-10-23 15:22 UTC by phpbugs at joern dot heissler dot de)geoip-1.1.0-city.patch (last revision 2014-10-23 13:08 UTC by slim at inbox dot lv) patch-geoip_record_by_name (last revision 2014-10-23 02:47 UTC by phpbugs at joern dot heissler dot de) Pull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 15:00:01 2025 UTC |
Oh, and also see the GeoIP_db_avail function please. It checks only if a file exists, but these two database revisions share the same filename: GeoIPDBFileName[GEOIP_CITY_EDITION_REV0] = _GeoIP_full_path_to( "GeoIPCity.dat"); GeoIPDBFileName[GEOIP_CITY_EDITION_REV1] = _GeoIP_full_path_to( "GeoIPCity.dat"); On my setup REV1 is said to be available, but apparently I'm using REV0 files. Trying to open my valid REV0 file as REV1 failed and caused a segfault too.