[ expat-Bugs-584832 ] incorrect handling of internal entities

noreply@sourceforge.net noreply@sourceforge.net
Mon Jul 22 09:51:06 2002


Bugs item #584832, was opened at 2002-07-22 06:28
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=584832&group_id=10127

Category: None
>Group: Test Required
Status: Open
Resolution: Accepted
Priority: 6
Submitted By: Mike Matsnev (haali)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: incorrect handling of internal entities

Initial Comment:
expat-1.95.4

Internal entities defined in the DTD are not properly
expanded in attribute values when an external encoding
handler is used. 

The cause of the problem is that a wrong pool is
cleared in processXmlDecl() and the encoding name
remains in the pool. When parsing the document an
entity name is appended to the encoding name already in
the pool, and not surprisingly the resulting string is
not found in the entities table. The attached patch
fixes the bug.

Also this bug might cause trouble in other places,
where the temp2pool is used.

/Mike

----------------------------------------------------------------------

Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2002-07-22 12:49

Message:
Logged In: YES 
user_id=3066

Removed duplicate upload of test program.

----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2002-07-22 10:07

Message:
Logged In: YES 
user_id=290026

Thanks a lot!

Now it's up to you, Fred.

----------------------------------------------------------------------

Comment By: Mike Matsnev (haali)
Date: 2002-07-22 10:03

Message:
Logged In: YES 
user_id=287590

I wrote a simple test case that produces the output: "not
ok: undefined entity" before the fix, and "ok" after.

/Mike

----------------------------------------------------------------------

Comment By: Mike Matsnev (haali)
Date: 2002-07-22 10:03

Message:
Logged In: YES 
user_id=287590

I wrote a simple test case that produces the output: "not
ok: undefined entity" before the fix, and "ok" after.

/Mike

----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2002-07-22 09:39

Message:
Logged In: YES 
user_id=290026

Assigned to Fred - he usually takes care of test cases.

----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2002-07-22 09:30

Message:
Logged In: YES 
user_id=290026

I think your assessment is correct. 
Thank you for your bug report.
Could you please supply a test case for that - obviously
you have come across the bug in a specific case.

I already applied the patch. Leaving this report open
until test case (hopefully :-)) supplied.

Karl

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=584832&group_id=10127