php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #13364 domxml: Add support for ATTLIST
Submitted: 2001-09-18 08:34 UTC Modified: 2002-06-08 11:53 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: toface at nicetomeetyou dot to Assigned: mfischer (profile)
Status: Not a bug Package: Feature/Change Request
PHP Version: 4.0.6 OS: Debian x86 unstable
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: toface at nicetomeetyou dot to
New email:
PHP Version: OS:

 

 [2001-09-18 08:34 UTC] toface at nicetomeetyou dot to
tested with 4.0.7rc2

when CDATA is used in a ATTLIST tag, php crashes while trying to parse it into a xmltree or xmldocfile.

XML file:
<?xml version='1.0' standalone="yes"?>
<!DOCTYPE attackList [
  <!ELEMENT attack (host, port, attacks, date)>
    <!ELEMENT host EMPTY>
      <!ATTLIST host addr ID #REQUIRED>
      <!ATTLIST host addr CDATA #REQUIRED>
      <!ATTLIST host name CDATA #IMPLIED>
    <!ELEMENT port EMPTY>
      <!ATTLIST port portid ENTITY #REQUIRED>
      <!ATTLIST port protocol (tcp | udp | icmp) #REQUIRED>
    <!ELEMENT attacks EMPTY>
      <!ATTLIST attacks number ENTITY #REQUIRED>
    <!ELEMENT date EMPTY>
      <!ATTLIST date seconds ENTITY #REQUIRED>
]>
<attackList>
    <attack>
        <host addr="213.67.44.26" name="h26n2fls31o981.telia.com" />
        <port portid="137" protocol="udp" />
        <attacks number="6" />
        <date seconds="999160369" />
    </attack>
</attackList>

Script:
    $fd = fopen($file,"r");
    $myXML = fread($fd,filesize($file));
    fclose($fd);
    $docTree = xmltree($myXML);

gdb backtrace using apache and static php 4.0.6 will be here "real soon now"(tm)
(probably today though)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-09-18 08:47 UTC] derick@php.net
Program received signal SIGSEGV, Segmentation fault.
node_list_wrapper_dtor (node=0x82f5b80) at php_domxml.c:315
warning: Source file is more recent than executable.

315 if (!node || node->type == XML_DTD_NODE)
(gdb) bt
#0  node_list_wrapper_dtor (node=0x82f5b80) at php_domxml.c:315
#1  0x809ce58 in php_free_xml_doc (rsrc=0x8301a4c) at php_domxml.c:337
#2  0x81425aa in list_entry_destructor (ptr=0x8301a4c) at zend_list.c:177
#3  0x8142706 in zend_destroy_rsrc_list (ht=0x820ba9c) at zend_list.c:248
#4  0x8136b68 in shutdown_executor () at zend_execute_API.c:190
#5  0x813da12 in zend_deactivate () at zend.c:595
#6  0x8091f18 in php_request_shutdown (dummy=0x0) at main.c:736
#7  0x8145a26 in apache_php_module_main (r=0x82c5034, display_source_mode=0)
    at sapi_apache.c:96
#8  0x8090356 in send_php ()
#9  0x80903af in send_parsed_php ()
#10 0x81619f3 in ap_invoke_handler ()
#11 0x8175539 in process_request_internal ()
#12 0x817559c in ap_process_request ()
#13 0x816cb6e in child_main ()
 [2001-11-30 03:34 UTC] mfischer@php.net
Fix for crash is coming, but yet this is a feature request to support ATTLIST.

Assigned to me.
 [2001-11-30 03:40 UTC] mfischer@php.net
Stupid me, leave this domxml related.
 [2001-12-11 17:25 UTC] mfischer@php.net
De-assigned, makeing it a feature request.
 [2002-06-08 10:31 UTC] bigredlinux at yahoo dot com
Seems to work fine for me on php 4.2.1, except the fact that that DTD is invalid since it lists addr on host twice.

Close this.
 [2002-06-08 11:53 UTC] jtate@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately your version of PHP is too old -- the problem
might already be fixed. Please download a new PHP
version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

Try with latest version.  If the problem still exists, reopen.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 20:01:28 2024 UTC