From: ihsinme <61293369+ihsinme@users.noreply.github.com> Date: Wed, 25 Nov 2020 19:09:33 +0000 (+0300) Subject: Update bio_ok.c X-Git-Tag: OpenSSL_1_1_1i~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c60676338f1e25faaa44117238d8e35e507feee;p=thirdparty%2Fopenssl.git Update bio_ok.c CLA: trivial Reviewed-by: Matt Caswell Reviewed-by: Paul Dale Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/13515) (cherry picked from commit a614af95531dd9f168aa4b71bd1195b4fdfe1794) --- diff --git a/crypto/evp/bio_ok.c b/crypto/evp/bio_ok.c index a77cfb1552d..aba305537a6 100644 --- a/crypto/evp/bio_ok.c +++ b/crypto/evp/bio_ok.c @@ -203,7 +203,7 @@ static int ok_read(BIO *b, char *out, int outl) /* * copy start of the next block into proper place */ - if (ctx->buf_len_save - ctx->buf_off_save > 0) { + if (ctx->buf_len_save > ctx->buf_off_save) { ctx->buf_len = ctx->buf_len_save - ctx->buf_off_save; memmove(ctx->buf, &(ctx->buf[ctx->buf_off_save]), ctx->buf_len);