Message1002
Jython xml parser has a bug in xmlutils.py file.
Function skip_ws(self, necessary=0) does not raise
OutOfDataException() in case when it does not reach end
of file but surpasses data index.
This causes parser error in situation where read buffer
(self.data) ends with following characters: '<nexttag '.
Parser raises error:
index out of range: 16416, traceback:
File "shared/python/xmlSerializer.py", line 134, in
loadSuitIncarnationString
xml.sax.parseString(strArg, handler)
File "Lib/xml/sax/__init__.py", line 47, in parseString
parser.parse(inpsrc)
File "Lib/xml/sax/drivers2/drv_xmlproc.py", line 90,
in parse
parser.read_from(source.getByteStream(), bufsize)
File "Lib/xml/parsers/xmlproc/xmlutils.py", line 137,
in read_from
self.feed(buf)
File "Lib/xml/parsers/xmlproc/xmlutils.py", line 185,
in feed
self.do_parse()
File "Lib/xml/parsers/xmlproc/xmlproc.py", line 96,
in do_parse
self.parse_start_tag()
File "Lib/xml/parsers/xmlproc/xmlproc.py", line 149,
in parse_start_tag
if self.data[self.pos]!=">" and
self.data[self.pos]!="/":
This is caused by skip_ws function not throwing
apropriate exception in case it reaches end of buffer.
It just finishes executing setting self.pos surpassing
self.datasize.
Another sollution to that problem is to check self.pos
in function parse_start_tag after calling skip_ws() but
this problem might affect other functions also. |
|
Date |
User |
Action |
Args |
2008-02-20 17:17:23 | admin | link | issue1238766 messages |
2008-02-20 17:17:23 | admin | create | |
|