[erlang-bugs] Bug when streaming input to xmerl_scan

Simon Cornish zl9d97p02@REDACTED
Wed Jul 27 21:12:21 CEST 2011


Consider the following trivial XML:

<?xml version="1.0" ?>
<item a="b">blah</item>

If this is being fed to xmerl_scan:string via a continuation_fun and
the current input runs out at the end of an attribute value (in this
example, the 2nd " character on the item line) then it will crash.
This is demonstrated in the small attached module.
One possible fix that has been tested is also attached.

Regards,
 Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xmerl_scan_bug.erl
Type: application/octet-stream
Size: 559 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20110727/1fcc26b1/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xmerl_scan.patch
Type: application/octet-stream
Size: 1410 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20110727/1fcc26b1/attachment-0001.obj>


More information about the erlang-bugs mailing list