aboutsummaryrefslogtreecommitdiffstats
path: root/main/jitterentropy-library/06-fix-memory-size.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/jitterentropy-library/06-fix-memory-size.patch')
-rw-r--r--main/jitterentropy-library/06-fix-memory-size.patch42
1 files changed, 0 insertions, 42 deletions
diff --git a/main/jitterentropy-library/06-fix-memory-size.patch b/main/jitterentropy-library/06-fix-memory-size.patch
deleted file mode 100644
index b6a2b4c7f00..00000000000
--- a/main/jitterentropy-library/06-fix-memory-size.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-Patch already in upstream master:
-
-JENT: fix memory size in error code path
-The caller is allowed to specify the code size used for the memory
-access. Thus the error code path should observe it as well to ensure it
-only zeroizes the memory that was allocated.
-
-Reported-by: Jordan Day <jday@teradici.com>
-Signed-off-by: Stephan Mueller <smueller@chronox.de>
-
----
-
-diff -aur a/src/jitterentropy-base.c b/src/jitterentropy-base.c
---- a/src/jitterentropy-base.c
-+++ b/src/jitterentropy-base.c
-@@ -379,6 +379,7 @@
- *jent_entropy_collector_alloc_internal(unsigned int osr, unsigned int flags)
- {
- struct rand_data *entropy_collector;
-+ uint32_t memsize = 0;
-
- /*
- * Requesting disabling and forcing of internal timer
-@@ -405,8 +406,7 @@
- return NULL;
-
- if (!(flags & JENT_DISABLE_MEMORY_ACCESS)) {
-- uint32_t memsize = jent_memsize(flags);
--
-+ memsize = jent_memsize(flags);
- entropy_collector->mem = (unsigned char *)jent_zalloc(memsize);
-
- #ifdef JENT_RANDOM_MEMACCESS
-@@ -469,7 +469,7 @@
-
- err:
- if (entropy_collector->mem != NULL)
-- jent_zfree(entropy_collector->mem, JENT_MEMORY_SIZE);
-+ jent_zfree(entropy_collector->mem, memsize);
- jent_zfree(entropy_collector, sizeof(struct rand_data));
- return NULL;
- }