[xml] problem: xml-data w/ large content and xmlParseDoc

I'm using libxml (2.4.21) on Win32. I encountered a problem while passing xml Data with a tag containing 
quite a lot of base64-encoded data in memory.

I have a document that looks similiar to this in a char *:
(last line repeated about 200 times)

When I try to parse it using either xmlParseDoc or xmlParseMemory, I always get these error messages:

Entity: line 69: error: Premature end of data in tag <LData DataLength="23563">MDAw
Entity: line 69: error: Premature end of data in tag MzMzMzMzMzMzMzMzMzMzMzMzMzMzMz

If i write the data to a file and use xmlParseFile instead, it works.

I had a look into the code already and I think the problem is somewhere in SHRINK / GROW as used in 

After initializing the special handling for Large Content in line 2640 of parser.c (sources to 2.4.21), 
SHRINK / GROW is called, but afterwards ctxt->input->cur points to a 0 before the start of the real document 
data in memory.

Matthias Helletzgruber

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]