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: 2021-08-26 14:31 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: mail at daniel-berlin dot de Assigned: cmb (profile)
Status: Duplicate Package: geoip (PECL)
PHP Version: 5.6.6 OS: Linux
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: mail at daniel-berlin dot de
New email:
PHP Version: OS:

 

 [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

Pull Requests

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.
 [2021-08-26 14:31 UTC] cmb@php.net
-Status: Open +Status: Duplicate -Assigned To: +Assigned To: cmb
 [2021-08-26 14:31 UTC] cmb@php.net
Closing as duplicate of bug #68277 per the comment above.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 18:01:29 2024 UTC