Peeking a character as it turns out is a really bad idea as it involves the encoder
to pull characters. If the PeekChar happens to read a byte that is part of a
UTF8 string that needs more characters to process we would end up with the reported
crash.
Atsushi Enomoto tracked this down, and the fix is to use the binaryreader.BaseStream
to directly call into ReadByte and Read without ever probing with PeekChar (). It
is not really possible to use BinaryReader.ReadByte since this one can throw on
end-of-buffer conditions instead of returning -1
* XmlBinaryDictionaryReader.cs : fix GetAttribute() that returns
attributes from cache that are *not* in current element.
svn path=/trunk/mcs/; revision=135517
* XmlBinaryDictionaryReader.cs : there was wrong reusage of nodes
when the node was at the top of the stack. It was added twice and
call to reset resulted in end element with empty names.
* XmlBinaryDictionaryReaderTest.cs : verify that end element has
non-empty local name.
svn path=/trunk/mcs/; revision=135512
* XmlBinaryDictionaryReader.cs : fix utf16 array on getting its
length. Report correct length (since BinaryReader is directly used
it makes no sense to incompletely keep track of position in Source).
* XmlBinaryDictionaryReaderTest.cs : added test for utf16 chars.
svn path=/trunk/mcs/; revision=134388
* XmlBinaryDictionaryReader.cs : several fixes;
- Name property was always empty.
- Value property was always empty for attributes.
- TextIndex node type was not supported.
- node reset at Read() was incomplete.
- attribute Prefix for single character had wrong value.
- namespace nodes did not appear as attribute nodes.
- attribute value node must be always single. Another text node
means a text child of the element, not the following attr value.
tests will go in sys.servicemodel.
svn path=/trunk/mcs/; revision=132879
* XmlBinaryDictionaryReader.cs, XmlDictionaryWriter.cs :
a couple of fixes to reflect correct values for node properties
on each read step.
* XmlBinaryDictionaryReaderTest.cs: make tests more doubtful on
state.
svn path=/trunk/mcs/; revision=130655
* XmlBinaryDictionaryReader.cs, XmlBinaryDictionaryWriter.cs
XmlBinaryFormat.cs : implemented element with short prefix.
* XmlBinaryDictionaryReaderTest.cs,
XmlBinaryDictionaryWriterTest.cs : added test for element with
short prefix.
svn path=/trunk/mcs/; revision=130617
* XmlBinaryFormat.cs, XmlBinaryDictionaryReader.cs,
XmlBinaryDictionaryWriter.cs : improved shorthanded prefix
support. Not only autocreated prefixes but also explicitly-
specified 'a' .. 'z' prefixes are mapped as shorthand.
Some significant (and ongoing) namespace support changes.
* XmlBinaryDictionaryWriterTest.cs: added test for shorthand
prefixed attributes.
svn path=/trunk/mcs/; revision=130381
* XmlBinaryDictionaryReader.cs, XmlBinaryFormat.cs :
handle utf16 typed nodes. (not sure if it is used in writer.)
svn path=/trunk/mcs/; revision=130281
* XmlBinaryDictionaryReader.cs, XmlBinaryDictionaryWriter.cs,
XmlBinaryFormat.cs : fixed couple of issues regarding text and
base64 fixed-length buffers (their sizes are not variant).
Some ongoing changes on reading dummy-prefixed attributes.
svn path=/trunk/mcs/; revision=130278
2009-03-02 Chris Toshok <[email protected]>
* XmlBinaryDictionaryReader.cs, XmlSimpleDictionaryReader.cs: 2.1
has HasValue.
In System.XML/System.Xml:
2009-03-02 Chris Toshok <[email protected]>
* XmlReader.cs, XmlTextReader.cs, XmlTextReader2.cs,
EntityResolvingXmlReader.cs: 2.1 has HasValue.
In System.XML/Mono.Xml:
2009-03-02 Chris Toshok <[email protected]>
* SubtreeXmlReader.cs, XmlFilterReader.cs: 2.1 has HasValue.
In System.Xml.Linq/System.Xml.Linq:
2009-03-02 Chris Toshok <[email protected]>
* XNodeReader.cs: 2.1 has HasValue.
In System.ServiceModel.Web/System.Runtime.Serialization.Json:
2009-03-02 Chris Toshok <[email protected]>
* JsonReader.cs: 2.1 has HasValue.
svn path=/trunk/mcs/; revision=128406