]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
ossl_do_blob_header: fix return check
authorPeiwei Hu <jlu.hpw@foxmail.com>
Sun, 14 Nov 2021 09:15:11 +0000 (17:15 +0800)
committerTomas Mraz <tomas@openssl.org>
Mon, 22 Nov 2021 13:42:47 +0000 (14:42 +0100)
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17028)

engines/e_loader_attic.c

index 59f19d329f8c604a2a24e8de5b13d6c9384afc05..e675b006a84a04b9d549d4a4796ff333d7a42e8c 100644 (file)
@@ -1347,8 +1347,8 @@ static OSSL_STORE_INFO *file_try_read_msblob(BIO *bp, int *matchcount)
 
         if (BIO_buffer_peek(bp, peekbuf, sizeof(peekbuf)) <= 0)
             return 0;
-        if (!ossl_do_blob_header(&p, sizeof(peekbuf), &magic, &bitlen,
-                                 &isdss, &ispub))
+        if (ossl_do_blob_header(&p, sizeof(peekbuf), &magic, &bitlen,
+                                 &isdss, &ispub) <= 0)
             return 0;
     }