php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69216 Segmentation Fault in geoip_database_info()
Submitted: 2015-03-10 21:46 UTC Modified: -
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: mail at daniel-berlin dot de Assigned:
Status: Open Package: geoip (PECL)
PHP Version: 5.6.6 OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2015-03-10 21:46 UTC] mail at daniel-berlin dot de
Description:
------------
Hi.
geoip_database_info() causes an segfault with some database IDs.
No matter whether retrieving database info for these IDs makes sense or not - a segmentation fault should not occur...
Tested in cli and apache2handler SAPIs.

geoip extension version 	1.1.0
geoip library version 	1006005 

Affected database IDs: 6, 17, 18, 31


Test script:
---------------
php -r 'foreach(geoip_db_get_all_info() as $id => $info) { var_dump(geoip_database_info($id)); }'



Expected result:
----------------
Approx 35 lines containing either something like:

string(79) "GEO-106FREE 20150303 Build 1 Copyright (c) 2015 MaxMind Inc All 

... or ...

NULL


Actual result:
--------------
string(79) "GEO-106FREE 20150303 Build 1 Copyright (c) 2015 MaxMind Inc All Rights Reserved"
string(79) "GEO-533LITE 20150303 Build 1 Copyright (c) 2015 MaxMind Inc All Rights Reserved"
NULL
NULL
NULL
Segmentation fault (core dumped)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-07-20 16:42 UTC] anthon at piwik dot org
geoip_database_info() calls GeoIP_open_type() which makes this a duplicate of #68277.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Feb 29 10:01:27 2020 UTC