diff options
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/comp/c_rle.c')
| -rw-r--r-- | Cryptlib/OpenSSL/crypto/comp/c_rle.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Cryptlib/OpenSSL/crypto/comp/c_rle.c b/Cryptlib/OpenSSL/crypto/comp/c_rle.c index adf16631..e9aabbd1 100644 --- a/Cryptlib/OpenSSL/crypto/comp/c_rle.c +++ b/Cryptlib/OpenSSL/crypto/comp/c_rle.c @@ -33,7 +33,7 @@ static int rle_compress_block(COMP_CTX *ctx, unsigned char *out, { /* int i; */ - if (olen < (ilen + 1)) { + if (ilen == 0 || olen < (ilen - 1)) { /* ZZZZZZZZZZZZZZZZZZZZZZ */ return (-1); } @@ -49,7 +49,7 @@ static int rle_expand_block(COMP_CTX *ctx, unsigned char *out, { int i; - if (ilen == 0 || olen < (ilen - 1)) { + if (olen < (ilen - 1)) { /* ZZZZZZZZZZZZZZZZZZZZZZ */ return (-1); } |
