#182 incorrect handling of internal entities

Test Required
closed-accepted
None
6
2002-07-22
2002-07-22
No

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

Discussion

  • Mike Matsnev

    Mike Matsnev - 2002-07-22

    patch for the incorrent handling of internal entities in attributes bug

     
  • Karl Waclawek

    Karl Waclawek - 2002-07-22

    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

     
  • Karl Waclawek

    Karl Waclawek - 2002-07-22
    • status: open --> open-accepted
     
  • Karl Waclawek

    Karl Waclawek - 2002-07-22
    • assigned_to: nobody --> fdrake
     
  • Karl Waclawek

    Karl Waclawek - 2002-07-22

    Logged In: YES
    user_id=290026

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

     
  • Mike Matsnev

    Mike Matsnev - 2002-07-22

    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

     
  • Mike Matsnev

    Mike Matsnev - 2002-07-22

    a test case for the bug

     
  • Mike Matsnev

    Mike Matsnev - 2002-07-22

    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

     
  • Karl Waclawek

    Karl Waclawek - 2002-07-22

    Logged In: YES
    user_id=290026

    Thanks a lot!

    Now it's up to you, Fred.

     
  • Fred L. Drake, Jr.

    Logged In: YES
    user_id=3066

    Removed duplicate upload of test program.

     
  • Fred L. Drake, Jr.

    • priority: 5 --> 6
     
  • Fred L. Drake, Jr.

    • milestone: --> Test Required
     
  • Fred L. Drake, Jr.

    Logged In: YES
    user_id=3066

    Integrated contributed test in tests/runtests.c revision
    1.25. Thanks!

     
  • Fred L. Drake, Jr.

    • status: open-accepted --> closed-accepted
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks