diff options
Diffstat (limited to 'src/lib/libcrypto/evp/evp_enc.c')
-rw-r--r-- | src/lib/libcrypto/evp/evp_enc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/evp/evp_enc.c b/src/lib/libcrypto/evp/evp_enc.c index 99bf59e05f..30941ed83d 100644 --- a/src/lib/libcrypto/evp/evp_enc.c +++ b/src/lib/libcrypto/evp/evp_enc.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: evp_enc.c,v 1.27 2015/09/10 15:56:25 jsing Exp $ */ | 1 | /* $OpenBSD: evp_enc.c,v 1.28 2016/05/03 12:38:53 tedu Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -334,7 +334,7 @@ EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, | |||
334 | return 0; | 334 | return 0; |
335 | } | 335 | } |
336 | if (i != 0) { | 336 | if (i != 0) { |
337 | if (i + inl < bl) { | 337 | if (bl - i > inl) { |
338 | memcpy(&(ctx->buf[i]), in, inl); | 338 | memcpy(&(ctx->buf[i]), in, inl); |
339 | ctx->buf_len += inl; | 339 | ctx->buf_len += inl; |
340 | *outl = 0; | 340 | *outl = 0; |