diff options
Diffstat (limited to 'src/lib/libcrypto/comp/c_rle.c')
| -rw-r--r-- | src/lib/libcrypto/comp/c_rle.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/comp/c_rle.c b/src/lib/libcrypto/comp/c_rle.c index 18bceae51e..47dfb67fbd 100644 --- a/src/lib/libcrypto/comp/c_rle.c +++ b/src/lib/libcrypto/comp/c_rle.c | |||
| @@ -30,7 +30,7 @@ static int rle_compress_block(COMP_CTX *ctx, unsigned char *out, | |||
| 30 | { | 30 | { |
| 31 | /* int i; */ | 31 | /* int i; */ |
| 32 | 32 | ||
| 33 | if (olen < (ilen+1)) | 33 | if (ilen == 0 || olen < (ilen-1)) |
| 34 | { | 34 | { |
| 35 | /* ZZZZZZZZZZZZZZZZZZZZZZ */ | 35 | /* ZZZZZZZZZZZZZZZZZZZZZZ */ |
| 36 | return(-1); | 36 | return(-1); |
| @@ -46,7 +46,7 @@ static int rle_expand_block(COMP_CTX *ctx, unsigned char *out, | |||
| 46 | { | 46 | { |
| 47 | int i; | 47 | int i; |
| 48 | 48 | ||
| 49 | if (ilen == 0 || olen < (ilen-1)) | 49 | if (olen < (ilen-1)) |
| 50 | { | 50 | { |
| 51 | /* ZZZZZZZZZZZZZZZZZZZZZZ */ | 51 | /* ZZZZZZZZZZZZZZZZZZZZZZ */ |
| 52 | return(-1); | 52 | return(-1); |
