summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/comp/c_rle.c
diff options
context:
space:
mode:
authordjm <>2011-11-03 02:32:23 +0000
committerdjm <>2011-11-03 02:32:23 +0000
commit113f799ec7d1728f0a5d7ab5b0e3b42e3de56407 (patch)
tree26d712b25a8fa580b8f2dfc6df470ba5ffea9eb7 /src/lib/libcrypto/comp/c_rle.c
parent829fd51d4f8dde4a7f3bf54754f3c1d1a502f5e2 (diff)
downloadopenbsd-113f799ec7d1728f0a5d7ab5b0e3b42e3de56407.tar.gz
openbsd-113f799ec7d1728f0a5d7ab5b0e3b42e3de56407.tar.bz2
openbsd-113f799ec7d1728f0a5d7ab5b0e3b42e3de56407.zip
import OpenSSL 1.0.0e
Diffstat (limited to 'src/lib/libcrypto/comp/c_rle.c')
-rw-r--r--src/lib/libcrypto/comp/c_rle.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/libcrypto/comp/c_rle.c b/src/lib/libcrypto/comp/c_rle.c
index efd366fa22..18bceae51e 100644
--- a/src/lib/libcrypto/comp/c_rle.c
+++ b/src/lib/libcrypto/comp/c_rle.c
@@ -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 (olen < (ilen-1)) 49 if (ilen == 0 || olen < (ilen-1))
50 { 50 {
51 /* ZZZZZZZZZZZZZZZZZZZZZZ */ 51 /* ZZZZZZZZZZZZZZZZZZZZZZ */
52 return(-1); 52 return(-1);
@@ -59,4 +59,3 @@ static int rle_expand_block(COMP_CTX *ctx, unsigned char *out,
59 } 59 }
60 return(ilen-1); 60 return(ilen-1);
61 } 61 }
62