edgar-mtz-e / slimdx

Automatically exported from code.google.com/p/slimdx
0 stars 0 forks source link

Negative array size in Read() method of CaptureBuffer class #428

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi SlimDX team,

I came across following bug:

if( data2 != nullptr && read < sizeBytes )
{
    readBytes2 = gcnew array<Byte>( read - sizeBytes );
    data2->Read( readBytes2, 0, read - sizeBytes );
}

I assume that 'read - sizeBytes' should be just 'read'.

Best Regards
Karol

Original issue reported on code.google.com by k...@ventuz.com on 2 Feb 2009 at 11:02

GoogleCodeExporter commented 9 years ago
Will fix.

Original comment by Mike.Popoloski on 4 Feb 2009 at 6:19

GoogleCodeExporter commented 9 years ago
Fixed in r907.

Original comment by Mike.Popoloski on 4 Feb 2009 at 8:28