[xml] xmlParseMemory() and xmlParseDTD()
- From: "MDC A." <comymar yahoo es>
- To: xml gnome org
- Subject: [xml] xmlParseMemory() and xmlParseDTD()
- Date: Wed, 6 Mar 2002 13:07:54 +0100 (CET)
hi,
I'm working on Solaris 2.8 using the library
libxml2.4.15. When I try to validate a bad formed
buffer of memory like that:
"<?xml version = \"1.0\" encoding = \"ISO-8859-1\"
standalone = \"no\"?>\n\
<!DOCTYPE REQ SYSTEM \"example.dtd\">\n\
<REQ ver\"3.00\">\n\
<CLIENT>\n\
<ID> peter</ID>\n\
<PWD> peter</PWD>\n\
</CLIENT>\n\
</REQ>"
(It's bad formed because it miss a "=" between the
attribute "ver" and the value "3.00")
I obtain a Segmentation Fault in order to obtain a
error message. In the stack I can see that:
xmlSAXParseMemory(0x0, 0x120bd8, 0x204, 0x0,
0x81010100, 0xff0000)
xmlParseDocument(0x160840, 0x204, 0x0, 0x0, 0x0,
0x0)
xmlParseElement(0x160840, 0x15f698, 0x0, 0x160d28,
0x0, 0x0)
xmlParseContent(0x160840, 0x15f6e8, 0x0, 0xd7ff,
0x1, 0x2a)
xmlParseElement(0x160840, 0x3c, 0x173cf0, 0x160d28,
0x23664,
0x46c8c)
xmlParseContent(0x160840, 0x15f708, 0x2, 0xd7ff,
0x1, 0x2a)
xmlParseElement(0x160840, 0x3c, 0x0, 0x4, 0x2368c,
0xfea42038)
xmlParseStartTag(0x0, 0x0, 0x0, 0xd7ff, 0x1, 0x2a)
xmlParseAttribute(0x160840, 0xffbef1cc, 0x3,
0xfeab8000,0x2368c, 0xfea42038)
xmlParserError(0x160840, 0x122cf0, 0x1646c8, 0x0,
0x0, 0x164afd)
xmlGenericErrorDefaultFunc(0x0, 0x12fcf8, 0x5,
0xfffffff8,
0x44, 0x1646b8)
vfprintf(0x0, 0xffbef0e4, 0xfeabf9b4, 0x8, 0x12fcf8,
0x1646c8)
I have a similar problem when I use
xmlParseDtd(NULL,"example.dtd")
if the name of the DTD is wrong, I obtain a
segmentation fault and in the stack I see that:
xmlSAXParseDTD(0x0, 0x0, 0x115fee, 0x0, 0x23664,
0xffbef5bc)
resolveEntity(0x160840, 0x0, 0x115fee, 0x38,
0x23664,
0xfea411b8)
xmlDefaultExternalEntityLoader(0x161a10, 0x0,
0x160840, 0xfffffff8, 0x0, 0x160959)
xmlParserWarning(0x14e400, 0x1247ec, 0x15f7b8, 0x0,
0x23664,
0x5f994)
xmlGenericErrorDefaultFunc(0x0, 0x12fd24, 0x4, 0x0,
0x656a656d, 0xfea9a6b4)
vfprintf(0x0, 0xffbef38c, 0xfeabf9b4, 0xc, 0x12fd24,
0x58ae8)
which is the problem here?
How can the problem be solved?
thanks a lot
A.M.C
_______________________________________________________________
Do You Yahoo!?
Yahoo! Messenger
Comunicación instantánea gratis con tu gente.
http://messenger.yahoo.es
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]