mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-05-05 14:34:30 +02:00
27 lines
868 B
Diff
27 lines
868 B
Diff
From: Dermot Bradley <dermot_bradley@yahoo.com>
|
|
Date: Mon, 10 Apr 2023 14:25 +0100
|
|
|
|
In the error cleanup block of jent_entropy_collector_alloc_internal(),
|
|
the hash_state should also be zeroed and freed.
|
|
|
|
Conflicting flags of JENT_DISABLE_INTERNAL_TIMER and
|
|
JENT_FORCE_INTERNAL_TIMER will cause a EHEALTH return from
|
|
jent_notime_enable() and jump to the error cleanup block after
|
|
hash_state has been allocated.
|
|
|
|
Upstream PR #98, already merged in master.
|
|
|
|
---
|
|
|
|
diff -aur a/src/jitterentropy-base.c b/src/jitterentropy-base.c
|
|
--- a/src/jitterentropy-base.c
|
|
+++ b/src/jitterentropy-base.c
|
|
@@ -486,6 +486,8 @@
|
|
err:
|
|
if (entropy_collector->mem != NULL)
|
|
jent_zfree(entropy_collector->mem, memsize);
|
|
+ if (entropy_collector->hash_state != NULL)
|
|
+ sha3_dealloc(entropy_collector->hash_state);
|
|
jent_zfree(entropy_collector, sizeof(struct rand_data));
|
|
return NULL;
|
|
}
|