mirror of
https://github.com/systemd/systemd.git
synced 2025-03-10 16:58:28 +03:00
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
This commit is contained in:
parent
a61473bde5
commit
1dea9f1268
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user