diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2012-07-11 23:31:36 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2012-07-11 23:31:36 +0000 |
commit | 0758ab5ea778e4ba36d2150af1bba602a48d6467 (patch) | |
tree | 0c30591ac90cb5e07a0763793709fd1056b67f57 /crypto/comp/c_rle.c | |
parent | 2b8b5455829304396e38200c205612c4dc57c052 (diff) |
Diffstat (limited to 'crypto/comp/c_rle.c')
-rw-r--r-- | crypto/comp/c_rle.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/comp/c_rle.c b/crypto/comp/c_rle.c index 18bceae51e76..47dfb67fbd52 100644 --- a/crypto/comp/c_rle.c +++ b/crypto/comp/c_rle.c @@ -30,7 +30,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); @@ -46,7 +46,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); |