File handle leaked on SwfReader.Inflate()
Brought to you by:
swfdotnet
The Inflate() method of SwfReader will leak a file handle when the BufferedBinaryReader is reinitialised from a MemoryStream (Line 268).
This can be fixed by closing the reader (add "br.close();") before re-assigning the variable.
In the Inflate method:
// ~Line 261
zipInflator.Inflate(uncompressed,8,size-8);
/* Start fix. */
// Close the handle before re-assigning to avoid a file handle leak:
br.Close();
/* End fix. */
// ~Line 268
// new memory stream for uncompressed swf
MemoryStream m = new MemoryStream(uncompressed);