[Mono-bugs] [Bug 441443] Deserialize() seeks to illegal stream position

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Nov 4 07:11:27 EST 2008


https://bugzilla.novell.com/show_bug.cgi?id=441443

User vargaz at gmail.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=441443#c1


Zoltan Varga <vargaz at gmail.com> changed:

           What    |Removed                                         |Added
----------------------------------------------------------------------------
                 CC|                                                |vargaz at gmail.com




--- Comment #1 from Zoltan Varga <vargaz at gmail.com>  2008-11-04 05:11:27 MST ---
What mono version is this ? Also, a testcase would be useful.

The offending code in BinaryReader.cs looks like this:

                        int ccount = ReadCharBytes (result, 0, 1, out bcount);

                        // Reposition the stream
                        m_stream.Position -= bcount;

Here, ReadCharBytes sets bcount to 0, and only increments it, so the only way
it could become negative is by overflowing.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list