eth4io / libkml

Automatically exported from code.google.com/p/libkml
Other
0 stars 0 forks source link

ParseAtom crashes on RSS #89

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. listfeed http://rss.macworld.com/macworld/topics/storage_backup (or any .rss 
file)
2.
3.

What is the expected output?

"parse failed" (listfeed uses ParseAtom which doesn't grok <rss>

 What do you see instead?

gdb) bt
#0  0x001199ba in XML_StopParser ()
#1  0x000a0f33 in kmldom::KmlHandler::StartElement (this=0xbffff6e4, 
name=0x209d0c "rss", 
attrs=0x209750) at ../../../../src/kml/dom/kml_handler.cc:109
#2  0x00018b69 in kmlbase::ExpatHandlerNs::StartElement (this=0xbffff760, 
prefixed_name=0x1fff708 <Address 0x1fff708 out of bounds>, atts=0x1fff708) at 
../../../../src/kml/base/expat_handler_ns.cc:64
#3  0x0011dffa in XML_SetEncoding ()
#4  0x0011e9ba in XML_SetEncoding ()
#5  0x0011f221 in XML_SetEncoding ()
#6  0x001206ac in XML_SetEncoding ()
#7  0x001195ff in XML_ParseBuffer ()
#8  0x00019327 in kmlbase::ExpatParser::_ParseString (this=0xbffff5b8, 
xml=@0x1fff708, 
errors=0x0) at ../../../../src/kml/base/expat_parser.cc:126
#9  0x000193dc in kmlbase::ExpatParser::ParseString (xml=@0x1fff708, 
handler=0x1fff708, 
errors=0x1fff708, namespace_aware=true) at 
../../../../src/kml/base/expat_parser.cc:83
#10 0x000a2b11 in kmldom::Parser::ParseAtom (this=0x1fff708, atom=@0xbffff820, 
errors=0x0) at ../../../../src/kml/dom/parser.cc:93
#11 0x000a302c in kmldom::ParseAtom (atom=@0x1fff708, errors=0x1fff708) at 
../../../../src/kml/dom/parser.cc:121
#12 0x00001a18 in main (argc=2, argv=0xbffff874) at 
../../../examples/hellonet/listfeed.cc:53
(gdb) 

KmlHandler should perhaps not expect get_parser() always be valid and/or
ParseAtom somewhere should be setting this.

Please use labels and text to provide additional information.

Original issue reported on code.google.com by kml.b...@gmail.com on 4 Jun 2009 at 1:50