diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 13:38:34 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 13:38:34 +0000 |
commit | 63af4e067acaebd2c134bcef91755c1be7eb3535 (patch) | |
tree | 7b36db2d56f6d6f129ba6a7d0467523fa21c10f0 /decoder.cc | |
parent | Adding debian version 0.8-1. (diff) | |
download | lzlib-63af4e067acaebd2c134bcef91755c1be7eb3535.tar.xz lzlib-63af4e067acaebd2c134bcef91755c1be7eb3535.zip |
Merging upstream version 0.9.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'decoder.cc')
-rw-r--r-- | decoder.cc | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -44,6 +44,7 @@ const CRC32 crc32; // Returns the number of bytes copied. int Circular_buffer::read_data( uint8_t * const out_buffer, const int out_size ) throw() { + if( out_size < 0 ) return 0; int size = 0; if( get > put ) { @@ -73,6 +74,7 @@ int Circular_buffer::read_data( uint8_t * const out_buffer, const int out_size ) // Returns the number of bytes copied. int Circular_buffer::write_data( const uint8_t * const in_buffer, const int in_size ) throw() { + if( in_size < 0 ) return 0; int size = 0; if( put >= get ) { |