mail-archives/mono-bugs/2004-June/016929.html

86 строки
3.2 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mono-bugs] [Bug 59648][Maj] Changed - UTF8Encoding.GetChars() fils for some byte data
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:bugzilla-daemon%40bugzilla.ximian.com">
<META NAME="robots" CONTENT="index,nofollow">
<LINK REL="Previous" HREF="016928.html">
<LINK REL="Next" HREF="016930.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mono-bugs] [Bug 59648][Maj] Changed - UTF8Encoding.GetChars() fils for some byte data
</H1>
<B>bugzilla-daemon@bugzilla.ximian.com
</B>
<A HREF="mailto:bugzilla-daemon%40bugzilla.ximian.com"
TITLE="[Mono-bugs] [Bug 59648][Maj] Changed - UTF8Encoding.GetChars() fils for some byte data">bugzilla-daemon@bugzilla.ximian.com
</A><BR>
<I>Mon, 7 Jun 2004 05:53:27 -0400 (EDT)</I>
<P><UL>
<LI> Previous message: <A HREF="016928.html">[Mono-bugs] [Bug 59545][Maj] Changed - Mono Beta 2: XML signature incompatability between Mono and .NET
</A></li>
<LI> Next message: <A HREF="016930.html">[Mono-bugs] [Bug 59648][Maj] Changed - UTF8Encoding.GetChars() fils for some byte data
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#16929">[ date ]</a>
<a href="thread.html#16929">[ thread ]</a>
<a href="subject.html#16929">[ subject ]</a>
<a href="author.html#16929">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by <A HREF="mailto:atsushi@ximian.com.">atsushi@ximian.com.</A>
<A HREF="http://bugzilla.ximian.com/show_bug.cgi?id=59648">http://bugzilla.ximian.com/show_bug.cgi?id=59648</A>
--- shadow/59648 2004-06-07 01:02:28.000000000 -0400
+++ shadow/59648.tmp.9782 2004-06-07 05:53:27.000000000 -0400
@@ -46,6 +46,22 @@
Expected Results:
It successfully runs under MS.NET
How often does this happen?
always
+
+------- Additional Comments From <A HREF="mailto:atsushi@ximian.com">atsushi@ximian.com</A> 2004-06-07 05:53 -------
+Can't we just /ignore those overlongs?
+
+It might be used like this way (as we talked on irc):
+
+BinaryReader br = new BinaryReader (stream);
+while (br.PeekChar ())
+ br.ReadInt32 ();
+
+Note that PeekChar () tries to read one utf-8 character.
+
+Currently the code above will &quot;randomly&quot; crashes (well, not random,
+but users might guess so) when PeekChar() met overlong binary data.
+
+Attaching the patch.
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI> Previous message: <A HREF="016928.html">[Mono-bugs] [Bug 59545][Maj] Changed - Mono Beta 2: XML signature incompatability between Mono and .NET
</A></li>
<LI> Next message: <A HREF="016930.html">[Mono-bugs] [Bug 59648][Maj] Changed - UTF8Encoding.GetChars() fils for some byte data
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#16929">[ date ]</a>
<a href="thread.html#16929">[ thread ]</a>
<a href="subject.html#16929">[ subject ]</a>
<a href="author.html#16929">[ author ]</a>
</LI>
</UL>
</body></html>