php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60066 PHP segfault when build against GeoIP 1.4.8
Submitted: 2011-10-15 14:43 UTC Modified: 2011-10-24 00:22 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: fedora at famillecollet dot com Assigned: ohill (profile)
Status: Closed Package: geoip (PECL)
PHP Version: 5.3.8 OS: GNU/Linux (Fedora 15)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: fedora at famillecollet dot com
New email:
PHP Version: OS:

 

 [2011-10-15 14:43 UTC] 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)


Patches

build.patch (last revision 2011-10-15 14:44 UTC by fedora at famillecollet dot com)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-10-15 15:04 UTC] felipe@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: ohill
 [2011-10-15 15:04 UTC] felipe@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-24 00:22 UTC] ohill@php.net
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.


 [2011-10-24 00:22 UTC] ohill@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 05:01:27 2024 UTC