diff options
author | Kees Cook <keescook@chromium.org> | 2021-06-17 00:48:19 +0300 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2022-02-14 03:50:06 +0300 |
commit | 938a000e3f9bead24ea753286b3e4d2423275c9e (patch) | |
tree | f3cdcabaea66b2f14b5488b6180cf552814b5aec /arch/x86/boot | |
parent | f68f2ff91512c199ec24883001245912afc17873 (diff) |
fortify: Detect struct member overflows in memmove() at compile-time
As done for memcpy(), also update memmove() to use the same tightened
compile-time checks under CONFIG_FORTIFY_SOURCE.
Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'arch/x86/boot')
-rw-r--r-- | arch/x86/boot/compressed/misc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c index a4339cb2d247..1cdcaf34ee36 100644 --- a/arch/x86/boot/compressed/misc.c +++ b/arch/x86/boot/compressed/misc.c @@ -37,10 +37,11 @@ * try to define their own functions if these are not defined as macros. */ #define memzero(s, n) memset((s), 0, (n)) +#ifndef memmove #define memmove memmove - /* Functions used by the included decompressor code below. */ void *memmove(void *dest, const void *src, size_t n); +#endif /* * This is set up by the setup-routine at boot-time |