From: Shreenidhi Shedi Date: Fri, 10 Jun 2022 10:09:50 +0000 (+0530) Subject: boot: use efi_memcpy inplace of memcpy X-Git-Tag: v252-rc1~823 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1dea9f1268eb606b5c220948685ba03f3ec4b246;p=thirdparty%2Fsystemd.git boot: use efi_memcpy inplace of memcpy `efi_memcpy` does some validations before referencing pointers, it is the safer option for this case. Fixes: CID#1489876 --- diff --git a/src/boot/efi/util.h b/src/boot/efi/util.h index e191fe58664..b75589f53dc 100644 --- a/src/boot/efi/util.h +++ b/src/boot/efi/util.h @@ -67,7 +67,7 @@ static inline void *xmalloc_multiply(size_t size, size_t n) { _malloc_ _alloc_(3) _returns_nonnull_ _warn_unused_result_ static inline void *xrealloc(void *p, size_t old_size, size_t new_size) { void *r = xmalloc(new_size); - memcpy(r, p, MIN(old_size, new_size)); + efi_memcpy(r, p, MIN(old_size, new_size)); free(p); return r; }