[Mono-bugs] [Bug 46143][Nor] New - CryptoStream.Close throws Exception when not read to end

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Fri, 11 Jul 2003 06:06:34 -0400 (EDT)


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 joergr@voelcker.com.

http://bugzilla.ximian.com/show_bug.cgi?id=46143

--- shadow/46143	Fri Jul 11 06:06:34 2003
+++ shadow/46143.tmp.32167	Fri Jul 11 06:06:34 2003
@@ -0,0 +1,47 @@
+Bug#: 46143
+Product: Mono/Class Libraries
+Version: unspecified
+OS: Debian Woody
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: JoergR@voelcker.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: CryptoStream.Close throws Exception when not read to end
+
+Description of Problem:
+If you open a CryptoStream for reading and don't read it to end it throws
+an exception: cannot flush a non-writeable CryptoStream
+
+
+Steps to reproduce the problem:
+1. Compile the attached sample
+2. Run it
+
+Actual Results:
+Please e
+cannot flush a non-writeable CryptoStream
+in [0x0002c] (at
+/home/viadmin/mono-cvs/mcs/class/corlib/System.Security.Cryptography/CryptoStream.cs:170)
+00 System.Security.Cryptography.CryptoStream:FlushFinalBlock ()
+in <0x00054> 08 System.Security.Cryptography.CryptoStream:FlushFinalBlock ()
+in [0x0000c] (at
+/home/viadmin/mono-cvs/mcs/class/corlib/System.Security.Cryptography/CryptoStream.cs:90)
+00 System.Security.Cryptography.CryptoStream:Close ()
+in <0x00259> 00 MonoTest.MainClass:Main ()
+
+Expected Results:
+Please enc
+
+How often does this happen? 
+Always.
+
+Additional Information:
+It happened when deserializing objects from crypted files.