Menu

#119 Bad pointer from characterData handler

Platform Specific
closed-remind
None
5
2002-08-27
2001-12-04
No

Expat frequently returns bad data pointers to my
handler for XML_SetCharacterDataHandler. I have expat
V 1.95.2 installed on a SUN w Solaris 2.5.1.

Discussion

  • Paul Plummer

    Paul Plummer - 2001-12-04

    Simple test case shows problem

     
  • Fred L. Drake, Jr.

    Logged In: YES
    user_id=3066

    Your test for a "bad pointer" in Element::copyData() looks
    strange to me, but there's definately something weird going
    on. I'll add it to my plate.

     
  • Fred L. Drake, Jr.

    • assigned_to: nobody --> fdrake
     
  • Fred L. Drake, Jr.

    Logged In: YES
    user_id=3066

    I just tried this again using the CVS version of Expat and
    the test for a "bad pointer" disabled, and saw no ill
    effects. Please test with the CVS version of Expat if
    possible. Be sure to follow the instructions in the README
    to build the XML_UNICODE version of the library.

    I'll ignore this until you're able to confirm that there's
    still a problem in a more current version of Expat (with a
    strong preference for the CVS version).

    Following up to this report on SourceForge will add this
    back to my list.

     
  • Fred L. Drake, Jr.

    • milestone: --> Platform Specific
    • status: open --> closed-remind
     
  • Nobody/Anonymous

    Logged In: NO

    Well, I noticed also that depending on the size of the
    buffer the parser is using, the CharacterDataHandler routine
    is given just a portion of the data between the start and
    end tags because it is split across two buffers of xml from
    the stream (a file in my case). This causes the
    CharacterDataHandler to then be called again with the
    remainder of the text data. Shouldn't expat put the two or
    more pieces together as one string and then call the handler?

    Respectfully,
    Bill Lynn
    blynn@jtls.nps.navy.mil

     

Log in to post a comment.