]> git.ipfire.org Git - thirdparty/kmod.git/commit
libkmod: enforce non-null memory in kmod_elf_new()
authorEmil Velikov <emil.l.velikov@gmail.com>
Wed, 7 May 2025 18:50:06 +0000 (19:50 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Tue, 20 May 2025 02:51:44 +0000 (21:51 -0500)
commit1b110b9bde5627ca9ed10900eb746c518cd1d56e
tree7203a2d20bbbd744ce9ce9a79bb86d68ab0cc9f2
parent132eb4ca83b291c81ed1ba31fd5120fd6944451d
libkmod: enforce non-null memory in kmod_elf_new()

In practise none of our code-paths will use a NULL pointer so we might
as well enforce that. To stay aligned with the kernel behaviour update
our init_module() preload library to return EFAULT... Should we get
confused and pass NULL in the future.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/346
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
libkmod/libkmod-elf.c
libkmod/libkmod-internal.h
testsuite/init_module.c