]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Update bio_ok.c
authorihsinme <61293369+ihsinme@users.noreply.github.com>
Wed, 25 Nov 2020 19:09:33 +0000 (22:09 +0300)
committerTomas Mraz <tmraz@fedoraproject.org>
Fri, 27 Nov 2020 12:58:59 +0000 (13:58 +0100)
CLA: trivial

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/13515)

crypto/evp/bio_ok.c

index f2d66ab1296a55f27569925780e34efca5e3447b..3d31f198295bf5e260217123572dc7bb0f9fdef4 100644 (file)
@@ -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);