[Mono-list] MemoryStream problem
carsten@hess.net
carsten@hess.net
Mon, 24 Feb 2003 04:49:44 -0800 (PST)
The memory stream makes a copy of the byte array it
works on. I already submitted a bug for this and
suggested a fix.
It seems to me that your little test program fails for
the same reason as my test failed.
The bug number is: 38481
http://bugzilla.ximian.com/show_bug.cgi?id=38481
-- Carsten
-----Original Message-----
From: Elan Feingold [mailto:efeingold@mn.rr.com]
Sent: February 23, 2003 7:18 PM
To: 'Sebastien Pouliot'; mono-list@lists.ximian.com
Subject: RE: [Mono-list] MemoryStream problem
> It may (or may not) be a MemoryStream issue. The
current CryptoStream
> implementation is very rudimentary - it was able to
run some samples
from MS
> but it's still far from complete. It's also one of
the few crypto
class that
> still doesn't have any unit tests.
I just thought it was extremely odd that the new
byte[capacity] would fail when it was requesting less
than 4Kb. It didn't seem like it necessarily had
anything to do with the CryptoStream stuff.
Do you know under what circumstances the "new
byte[...]" can fail, and where I could be looking for
the problem?
Best regards,
-elan
> > The code for MemoryStream.ToArray() starts with:
> >
> > public virtual byte[] ToArray() {
> > byte[] outBuffer = new
byte[capacity];
> >
> > What's happening is that outBuffer is coming back
null! I'm only
> > requesting 3864 bytes, so I find that extremely odd.
_______________________________________________
Mono-list maillist - Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list