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-3.0.0-alpha10~239 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a614af95531dd9f168aa4b71bd1195b4fdfe1794;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) --- diff --git a/crypto/evp/bio_ok.c b/crypto/evp/bio_ok.c index f2d66ab1296..3d31f198295 100644 --- a/crypto/evp/bio_ok.c +++ b/crypto/evp/bio_ok.c @@ -204,7 +204,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);