summaryrefslogtreecommitdiffstats
path: root/lib/libcrypto/comp/c_rle.c
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2011-11-03 02:34:28 +0000
committerdjm <djm@openbsd.org>2011-11-03 02:34:28 +0000
commitc32db552feb5310e2f4b27f02d313cfbf0b82a8a (patch)
treeb7b6074be11e20dcb5106c8a27f96bcb3fcdf5c2 /lib/libcrypto/comp/c_rle.c
parentimport OpenSSL 1.0.0e (diff)
downloadwireguard-openbsd-c32db552feb5310e2f4b27f02d313cfbf0b82a8a.tar.xz
wireguard-openbsd-c32db552feb5310e2f4b27f02d313cfbf0b82a8a.zip
openssl-1.0.0e: resolve conflicts
Diffstat (limited to 'lib/libcrypto/comp/c_rle.c')
-rw-r--r--lib/libcrypto/comp/c_rle.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libcrypto/comp/c_rle.c b/lib/libcrypto/comp/c_rle.c
index efd366fa223..18bceae51e7 100644
--- a/lib/libcrypto/comp/c_rle.c
+++ b/lib/libcrypto/comp/c_rle.c
@@ -46,7 +46,7 @@ static int rle_expand_block(COMP_CTX *ctx, unsigned char *out,
{
int i;
- if (olen < (ilen-1))
+ if (ilen == 0 || olen < (ilen-1))
{
/* ZZZZZZZZZZZZZZZZZZZZZZ */
return(-1);
@@ -59,4 +59,3 @@ static int rle_expand_block(COMP_CTX *ctx, unsigned char *out,
}
return(ilen-1);
}
-