summaryrefslogtreecommitdiffstats
path: root/lib/libcrypto/comp/c_rle.c
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2012-10-13 21:25:05 +0000
committerdjm <djm@openbsd.org>2012-10-13 21:25:05 +0000
commit5cdd308e23c573f20580c33373ebbd6aaf46ca93 (patch)
tree8c9c6577606b3e2a4f852b80db635caddf559533 /lib/libcrypto/comp/c_rle.c
parentimport OpenSSL-1.0.1c (diff)
downloadwireguard-openbsd-5cdd308e23c573f20580c33373ebbd6aaf46ca93.tar.xz
wireguard-openbsd-5cdd308e23c573f20580c33373ebbd6aaf46ca93.zip
resolve conflicts
Diffstat (limited to 'lib/libcrypto/comp/c_rle.c')
-rw-r--r--lib/libcrypto/comp/c_rle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libcrypto/comp/c_rle.c b/lib/libcrypto/comp/c_rle.c
index 18bceae51e7..47dfb67fbd5 100644
--- a/lib/libcrypto/comp/c_rle.c
+++ b/lib/libcrypto/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);