]> git.ipfire.org Git - thirdparty/kmod.git/commit
libkmod: Introduce elf_range_valid
authorTobias Stoeckmann <tobias@stoeckmann.org>
Sun, 20 Oct 2024 08:57:51 +0000 (10:57 +0200)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Tue, 22 Oct 2024 17:02:56 +0000 (12:02 -0500)
commitc16fadc97a6bba3229d67f47d3bf2c949f4a4e22
tree37278a8979238053ff6f1e8217ec80f15c2bca03
parentc627c6d93d77bc6b0b276dbd4a59eeb6e41146ef
libkmod: Introduce elf_range_valid

The range check should be performed in its own function for better
readability and reusability. Also, perform range checks before loops
or otherwise repeated calls by checking whole ranges instead of
single byte areas within said ranges iteratively.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/196
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
libkmod/libkmod-elf.c