Edit report at https://bugs.php.net/bug.php?id=60066&edit=1

 ID:                 60066
 Updated by:         oh...@php.net
 Reported by:        fedora at famillecollet dot com
 Summary:            PHP segfault when build against GeoIP 1.4.8
-Status:             Assigned
+Status:             Closed
 Type:               Bug
 Package:            geoip
 Operating System:   GNU/Linux (Fedora 15)
 PHP Version:        5.3.8
 Assigned To:        ohill
 Block user comment: N
 Private report:     N

 New Comment:

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------
[2011-10-15 15:04:02] fel...@php.net

I've already fixed the crash in the svn months ago, see:
http://svn.php.net/viewvc/pecl/geoip/trunk/geoip.c?r1=297236&r2=311837

But no release has been done as far I know.

Assigning bug to the maintainer.

------------------------------------------------------------------------
[2011-10-15 14:43:30] fedora at famillecollet dot com

Description:
------------
Reading the source code (of GeoIP) show that some GeoIPDBFileName are not 
defined, so this cause a segfault when trying to copy it to result.

The trivial attached patch solves this issue.


Test script:
---------------
php -r 'var_dump(geoip_db_get_all_info());'

Expected result:
----------------
array(31) {
  [1]=>
  array(3) {
    ["available"]=>
    bool(true)
    ["description"]=>
    string(21) "GeoIP Country Edition"
    ["filename"]=>
    string(26) "/usr/share/GeoIP/GeoIP.dat"
  }
...


Actual result:
--------------
Segmentation fault (core dumped)



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=60066&edit=1

Reply via email to