mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 09:46:20 +00:00
libports: rename jitterentropy's memcpy
To prevent symbol aliasing when using the static jitterentropy library rename it to 'jent_memcpy'. Fixes #4516.
This commit is contained in:
parent
c38b71146b
commit
03b2e3bda1
@ -1 +1 @@
|
||||
b982a76430613834d1df5877fd528e4fa0c65fb2
|
||||
a03bf871577242847d2be302ff4054197e8799e3
|
||||
|
@ -13,7 +13,8 @@ DIR_CONTENT(include/jitterentropy) := $(addprefix src/lib/jitterentropy/,\
|
||||
jitterentropy.h)
|
||||
|
||||
PATCHES := src/lib/jitterentropy/jitterentropy_h.patch \
|
||||
src/lib/jitterentropy/jitterentropy_delta_compare.patch
|
||||
src/lib/jitterentropy/jitterentropy_delta_compare.patch \
|
||||
src/lib/jitterentropy/jitterentropy_memcpy.patch
|
||||
PATCH_OPT := -p1 -d src/lib/jitterentropy
|
||||
|
||||
#
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2014-2017 Genode Labs GmbH
|
||||
* Copyright (C) 2014-2022 Genode Labs GmbH
|
||||
*
|
||||
* This file is part of the Genode OS framework, which is distributed
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
@ -42,7 +42,7 @@ void jent_zfree(void *ptr, unsigned int len)
|
||||
}
|
||||
|
||||
|
||||
void *memcpy(void *dest, const void *src, size_t n)
|
||||
void *jent_memcpy(void *dest, const void *src, size_t n)
|
||||
{
|
||||
return Genode::memcpy(dest, src, n);
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ static inline __u64 rol64(__u64 word, unsigned int shift)
|
||||
return (word << shift) | (word >> (64 - shift));
|
||||
}
|
||||
|
||||
void *memcpy(void *dest, const void *src, size_t n);
|
||||
void *jent_memcpy(void *dest, const void *src, size_t n);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -0,0 +1,13 @@
|
||||
diff --git a/jitterentropy-base.c b/jitterentropy-base.c
|
||||
index 28b1462..3ea4c90 100644
|
||||
--- a/jitterentropy-base.c
|
||||
+++ b/jitterentropy-base.c
|
||||
@@ -553,7 +553,7 @@ ssize_t jent_read_entropy(struct rand_data *ec, char *data, size_t len)
|
||||
tocopy = (DATA_SIZE_BITS / 8);
|
||||
else
|
||||
tocopy = len;
|
||||
- memcpy(p, &ec->data, tocopy);
|
||||
+ jent_memcpy(p, &ec->data, tocopy);
|
||||
|
||||
len -= tocopy;
|
||||
p += tocopy;
|
Loading…
x
Reference in New Issue
Block a user