[xml] Core dump with unknow charset



Hi,

I compiled libxml2-2.3.8 on AIX version 4 and release 3 with success. I have although WRNINGS:
ld: 0711-224 WARNING: Duplicate symbol: p_xargc
ld: 0711-224 WARNING: Duplicate symbol: p_xargv
ld: 0711-224 WARNING: Duplicate symbol: p_xrcfg
ld: 0711-224 WARNING: Duplicate symbol: p_xrc
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.

libxml2 crashes when used with unknown encoding like
<?xml version="1.0" encoding="ISO8859-1"?>
<CATALOG>
 <CD>
   <TITLE>Empire Burlesque</TITLE>
   <ARTIST>Bob Dylan</ARTIST>
   <COUNTRY>USA</COUNTRY>
   <COMPANY>Columbia</COMPANY>
   <PRICE>10.90</PRICE>
   <YEAR>1985</YEAR>
 </CD>
</CATALOG>
with xmllint
but
<?xml version="1.0" ?>
<CATALOG>
 <CD>
   <TITLE>Empire Burlesque</TITLE>
   <ARTIST>Bob Dylan</ARTIST>
   <COUNTRY>USA</COUNTRY>
   <COMPANY>Columbia</COMPANY>
   <PRICE>10.90</PRICE>
   <YEAR>1985</YEAR>
 </CD>
</CATALOG>
doesn't make it crash. Although, encoding="ISO-8859-1" doesn't crash. But anithing unknown like encoding="UT-8" or encoding="sdfsdfs" makes it crash.
Here is the dbx dump of the gjobread using encoding="ISO8859-1"

Segmentation fault in iconv_open at 0xd3a5fab8
0xd3a5fab8 (iconv_open+0x8) 800c0000        lwz   r0,0x0(r12)
(dbx) where
iconv_open() at 0xd3a5fab8
xmlFindCharEncodingHandler(0x20003248), line 1626 in "encoding.c"
unnamed block $b47, line 6896 in "parser.c"
xmlParseEncodingDecl(0x20001818), line 6896 in "parser.c"
xmlParseXMLDecl(0x20001818), line 7073 in "parser.c"
xmlParseDocument(0x20001818), line 7210 in "parser.c"
xmlSAXParseFile(0x0, 0x2ff22743, 0x0), line 9443 in "parser.c"
xmlParseFile(0x2ff22743), line 9485 in "parser.c"
parseGjobFile(filename = "gjobs.xml"), line 190 in "gjobread.c"
main(argc = 2, argv = 0x2ff22650), line 286 in "gjobread.c"
dbx>

Thierry RAMA

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.





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