diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bzip2.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bzip2.cpp b/src/bzip2.cpp index b855fd9..a6fef25 100644 --- a/src/bzip2.cpp +++ b/src/bzip2.cpp | |||
@@ -160,6 +160,11 @@ size_t Bu::BZip2::read( void *pData, size_t nBytes ) | |||
160 | if( bzState.avail_in == 0 ) | 160 | if( bzState.avail_in == 0 ) |
161 | { | 161 | { |
162 | nRead = rNext.read( pBuf, nBufSize ); | 162 | nRead = rNext.read( pBuf, nBufSize ); |
163 | if( nRead == 0 && rNext.isEos() ) | ||
164 | { | ||
165 | throw Bu::ExceptionBase("Premature end of underlying " | ||
166 | "stream found reading bzip2 stream."); | ||
167 | } | ||
163 | bzState.next_in = pBuf; | 168 | bzState.next_in = pBuf; |
164 | bzState.avail_in = nRead; | 169 | bzState.avail_in = nRead; |
165 | } | 170 | } |