[openssl-commits] [openssl] master update

Richard Levitte levitte at openssl.org
Mon Jul 3 05:47:16 UTC 2017


The branch master has been updated
       via  6e2f49b38429d9df00ed12ade60e3de3b9ba43b3 (commit)
      from  50c9ac07bb2aa97c0be6f7f08494943f99391724 (commit)


- Log -----------------------------------------------------------------
commit 6e2f49b38429d9df00ed12ade60e3de3b9ba43b3
Author: Richard Levitte <levitte at openssl.org>
Date:   Sat Jul 1 18:25:43 2017 +0200

    Make sure OSSL_STORE_load() isn't caught in an endless loop
    
    The post process callback might potentially say "no" to everything (by
    constantly returning NULL) and thereby cause an endless loop.  Ensure
    that we stop all processing when "eof" is reached.
    
    Reviewed-by: Paul Dale <paul.dale at oracle.com>
    (Merged from https://github.com/openssl/openssl/pull/3823)

-----------------------------------------------------------------------

Summary of changes:
 crypto/store/store_lib.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/crypto/store/store_lib.c b/crypto/store/store_lib.c
index d5bb8b8..91faae2 100644
--- a/crypto/store/store_lib.c
+++ b/crypto/store/store_lib.c
@@ -90,6 +90,9 @@ OSSL_STORE_INFO *OSSL_STORE_load(OSSL_STORE_CTX *ctx)
     OSSL_STORE_INFO *v = NULL;
 
  again:
+    if (OSSL_STORE_eof(ctx))
+        return NULL;
+
     v = ctx->loader->load(ctx->loader_ctx, ctx->ui_method, ctx->ui_data);
 
     if (ctx->post_process != NULL && v != NULL) {


More information about the openssl-commits mailing list