php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1263 Alternative fix for #1116 (xml.c)
Submitted: 1999-03-25 06:43 UTC Modified: 1999-06-20 20:41 UTC
From: greg at elysium dot ltd dot uk Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.7 OS: Linux 2.0.35
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: greg at elysium dot ltd dot uk
New email:
PHP Version: OS:

 

 [1999-03-25 06:43 UTC] greg at elysium dot ltd dot uk
Symptom: Garbage characters appearing after attribute values passed to startElementHandler by php3i_xml_startElementHandler in xml.c.

Already fixed in CVS (xml.c v1.22 -> v1.23).

However, since 0x00 is (in general) a valid character, it might be better to leave xml_utf8_decode alone and fix the problem in php3i_xml_startElementHandler instead, with the following one-liner:

<    add_assoc_string(args[2], key, decoded_value, 0);
---
>    add_assoc_stringl(args[2], key, decoded_value, decoded_len, 0);

Up to you. I'd already done this before seeing the other fix, so I thought I might as well report it...

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-06-20 20:41 UTC] jim at cvs dot php dot net
Added this fix.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 15 05:01:33 2025 UTC