php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58876 SolrDocument::unserialize() crashes
Submitted: 2009-10-03 18:15 UTC Modified: 2009-10-03 23:47 UTC
From: felipe@php.net Assigned: iekpo (profile)
Status: Closed Package: solr (PECL)
PHP Version: 5_3 CVS-2009-10-03 (dev) OS:
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:
Package:
Bug Type:
Summary:
From: felipe@php.net
New email:
PHP Version: OS:

 

 [2009-10-03 18:15 UTC] felipe@php.net
Description:
------------
See below.

Reproduce code:
---------------
Starting program: /home/felipe/dev/php5/sapi/cli/php -r '$x = new solrdocument; $x->unserialize(1);'
[Thread debugging using libthread_db enabled]

Warning: SolrDocument::unserialize(): Entity: line 1: parser error : Start tag expected, '<' not found in Command line code on line 1

Warning: SolrDocument::unserialize(): 1 in Command line code on line 1

Warning: SolrDocument::unserialize(): ^ in Command line code on line 1
[New Thread 0xb79416d0 (LWP 13030)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb79416d0 (LWP 13030)]
0x0826a646 in solr_unserialize_document_object (document_fields=0x9502bac, serialized=0x9502b2c "1", size=1, tsrm_ls=0x9394070)
    at /home/felipe/dev/php5/ext/solr/php_solr_document.c:302
302		register size_t num_nodes = result->nodeNr;
(gdb) bt
#0  0x0826a646 in solr_unserialize_document_object (document_fields=0x9502bac, serialized=0x9502b2c "1", size=1, tsrm_ls=0x9394070)
    at /home/felipe/dev/php5/ext/solr/php_solr_document.c:302
#1  0x0826b6d7 in zim_SolrDocument_unserialize (ht=1, return_value=0x9502a4c, return_value_ptr=0x0, this_ptr=0x9501c40, return_value_used=0, 
    tsrm_ls=0x9394070) at /home/felipe/dev/php5/ext/solr/php_solr_document.c:816
#2  0x0846de89 in zend_do_fcall_common_helper_SPEC (execute_data=0x953061c, tsrm_ls=0x9394070)
    at /home/felipe/dev/php5/Zend/zend_vm_execute.h:313
#3  0x0846f050 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0x953061c, tsrm_ls=0x9394070)
    at /home/felipe/dev/php5/Zend/zend_vm_execute.h:418
#4  0x0846cb6e in execute (op_array=0x9502284, tsrm_ls=0x9394070) at /home/felipe/dev/php5/Zend/zend_vm_execute.h:104
#5  0x0842c095 in zend_eval_stringl (str=0xbfea37f2 "$x = new solrdocument; $x->unserialize(1);", str_len=42, retval_ptr=0x0, 
    string_name=0x87e1070 "Command line code", tsrm_ls=0x9394070) at /home/felipe/dev/php5/Zend/zend_execute_API.c:1167
#6  0x0842c344 in zend_eval_stringl_ex (str=0xbfea37f2 "$x = new solrdocument; $x->unserialize(1);", str_len=42, retval_ptr=0x0, 
    string_name=0x87e1070 "Command line code", handle_exceptions=1, tsrm_ls=0x9394070) at /home/felipe/dev/php5/Zend/zend_execute_API.c:1209
#7  0x0842c3f8 in zend_eval_string_ex (str=0xbfea37f2 "$x = new solrdocument; $x->unserialize(1);", retval_ptr=0x0, 
    string_name=0x87e1070 "Command line code", handle_exceptions=1, tsrm_ls=0x9394070) at /home/felipe/dev/php5/Zend/zend_execute_API.c:1220
#8  0x0851e773 in main (argc=3, argv=0xbfea1d34) at /home/felipe/dev/php5/sapi/cli/php_cli.c:1229



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-10-03 19:31 UTC] israelekpo at gmail dot com
I am currently working on this.
 [2009-10-03 23:47 UTC] israelekpo at gmail dot com
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.

The error check is now in-place.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Dec 04 13:03:34 2021 UTC