|  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
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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: fedora at famillecollet dot com
New email:
PHP Version: OS:


 [2011-10-15 14:43 UTC] fedora at famillecollet dot com
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) {
  array(3) {
    string(21) "GeoIP Country Edition"
    string(26) "/usr/share/GeoIP/GeoIP.dat"

Actual result:
Segmentation fault (core dumped)


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

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-10-15 15:04 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: ohill
 [2011-10-15 15:04 UTC]
I've already fixed the crash in the svn months ago, see:

But no release has been done as far I know.

Assigning bug to the maintainer.
 [2011-10-24 00:22 UTC]
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

 For Windows:
Thank you for the report, and for helping us make PHP better.

 [2011-10-24 00:22 UTC]
-Status: Assigned +Status: Closed
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Jul 10 22:01:25 2020 UTC