From 224010546f03cff20e3622de9cbb609c31273e75 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 20 Jun 2012 04:48:05 +0000 Subject: Whew, the cipher was writing blocks at close when no data had been written yet. It only caused a problem when you stopped part way through reading something. --- src/experimental/cipher.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/experimental') diff --git a/src/experimental/cipher.h b/src/experimental/cipher.h index 91f1704..74f5124 100644 --- a/src/experimental/cipher.h +++ b/src/experimental/cipher.h @@ -98,7 +98,7 @@ namespace Bu virtual void flush() { - if( iWriteBufFill < iBlockSize ) + if( iWriteBufFill > 0 && iWriteBufFill < iBlockSize ) { memset( aWriteBuf+iWriteBufFill, 0, iBlockSize-iWriteBufFill ); encipher( aWriteBuf ); -- cgit v1.2.3