php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58873 SolrUtils::digestxmlresponse() crashes
Submitted: 2009-10-03 18:02 UTC Modified: 2009-10-04 00:51 UTC
From: felipe@php.net Assigned: iekpo (profile)
Status: Closed Package: solr (PECL)
PHP Version: 5_3 CVS-2009-10-03 (dev) OS: Linux
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:02 UTC] felipe@php.net
Description:
------------
See below.

Reproduce code:
---------------
Starting program: /home/felipe/dev/php5/sapi/cli/php -r 'solrutils::digestxmlresponse(0);'
[Thread debugging using libthread_db enabled]

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

Warning: SolrUtils::digestXmlResponse(): 0 in Command line code on line 1

Warning: SolrUtils::digestXmlResponse(): ^ in Command line code on line 1
[New Thread 0xb78af6d0 (LWP 12964)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb78af6d0 (LWP 12964)]
0x0827e0c3 in solr_get_node_size (data_node=0x0) at /home/felipe/dev/php5/ext/solr/solr_functions_helpers.c:448
448		xmlNode *curr_node = data_node->children;
(gdb) bt
#0  0x0827e0c3 in solr_get_node_size (data_node=0x0) at /home/felipe/dev/php5/ext/solr/solr_functions_helpers.c:448
#1  0x0827e046 in solr_write_object_opener (node=0x0, buffer=0xbfd116c0, enc_type=SOLR_ENCODE_STANDALONE, array_index=0)
    at /home/felipe/dev/php5/ext/solr/solr_functions_helpers.c:564
#2  0x0827f114 in solr_encode_object (node=0x0, buffer=0xbfd116c0, enc_type=SOLR_ENCODE_STANDALONE, array_index=0, parse_mode=0)
    at /home/felipe/dev/php5/ext/solr/solr_functions_helpers.c:959
#3  0x0827f255 in solr_encode_generic_xml_response (buffer=0xbfd116c0, serialized=0x8dbb3dc "0", size=1, parse_mode=0, tsrm_ls=0x8c4d070)
    at /home/felipe/dev/php5/ext/solr/solr_functions_helpers.c:997
#4  0x0827b3dc in zim_SolrUtils_digestXmlResponse (ht=1, return_value=0x8dbb398, return_value_ptr=0x0, this_ptr=0x0, return_value_used=0, 
    tsrm_ls=0x8c4d070) at /home/felipe/dev/php5/ext/solr/php_solr_utils.c:103
#5  0x0846de89 in zend_do_fcall_common_helper_SPEC (execute_data=0x8de961c, tsrm_ls=0x8c4d070)
    at /home/felipe/dev/php5/Zend/zend_vm_execute.h:313
#6  0x0846f050 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0x8de961c, tsrm_ls=0x8c4d070)
    at /home/felipe/dev/php5/Zend/zend_vm_execute.h:418
#7  0x0846cb6e in execute (op_array=0x8dbb284, tsrm_ls=0x8c4d070) at /home/felipe/dev/php5/Zend/zend_vm_execute.h:104
#8  0x0842c095 in zend_eval_stringl (str=0xbfd127fc "solrutils::digestxmlresponse(0);", str_len=32, retval_ptr=0x0, 
    string_name=0x87e1070 "Command line code", tsrm_ls=0x8c4d070) at /home/felipe/dev/php5/Zend/zend_execute_API.c:1167
#9  0x0842c344 in zend_eval_stringl_ex (str=0xbfd127fc "solrutils::digestxmlresponse(0);", str_len=32, retval_ptr=0x0, 
    string_name=0x87e1070 "Command line code", handle_exceptions=1, tsrm_ls=0x8c4d070) at /home/felipe/dev/php5/Zend/zend_execute_API.c:1209
#10 0x0842c3f8 in zend_eval_string_ex (str=0xbfd127fc "solrutils::digestxmlresponse(0);", retval_ptr=0x0, 
---Type <return> to continue, or q <return> to quit---
    string_name=0x87e1070 "Command line code", handle_exceptions=1, tsrm_ls=0x8c4d070) at /home/felipe/dev/php5/Zend/zend_execute_API.c:1220
#11 0x0851e773 in main (argc=3, argv=0xbfd11ba4) 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:33 UTC] israelekpo at gmail dot com
I am currently working on this.
 [2009-10-04 00:51 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.

This issue is now resolved.

Invalid XML string no longer causes fatal error
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Dec 07 06:03:35 2021 UTC