decompress: Use 8 byte alignment
commit 8217ad0a43 upstream.
The ZSTD decompressor requires malloc() allocations to be 8 byte
aligned, so ensure that this the case.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20230807162720.545787-19-ardb@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5c4feadb00
commit
bf0ca988e2
1 changed files with 1 additions and 1 deletions
|
|
@ -48,7 +48,7 @@ MALLOC_VISIBLE void *malloc(int size)
|
|||
if (!malloc_ptr)
|
||||
malloc_ptr = free_mem_ptr;
|
||||
|
||||
malloc_ptr = (malloc_ptr + 3) & ~3; /* Align */
|
||||
malloc_ptr = (malloc_ptr + 7) & ~7; /* Align */
|
||||
|
||||
p = (void *)malloc_ptr;
|
||||
malloc_ptr += size;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue