]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
padlock: fix exception in wrap_padlock_hash_fast
authorDmitry Baryshkov <dbaryshkov@gmail.com>
Fri, 27 Mar 2020 23:31:10 +0000 (02:31 +0300)
committerDmitry Baryshkov <dbaryshkov@gmail.com>
Fri, 27 Mar 2020 23:33:15 +0000 (02:33 +0300)
wrap_padlock_hash_fast() allocates a context on a stack (via local
variable) then tries to free it by calling wrap_padlock_hash_deinit()
causing a crash. Remove a call to deinit() to fix a crash.

Fixes #930

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
lib/accelerated/x86/sha-padlock.c

index bfb67f62e92614788ac056b749af600d685050e8..1030d4f63ed07fa1d63ad91ccbd2223041993b9c 100644 (file)
@@ -364,7 +364,6 @@ int wrap_padlock_hash_fast(gnutls_digest_algorithm_t algo,
                wrap_padlock_hash_update(&ctx, text, text_size);
 
                wrap_padlock_hash_output(&ctx, digest, ctx.length);
-               wrap_padlock_hash_deinit(&ctx);
        }
 
        return 0;