]> git.ipfire.org Git - thirdparty/kmod.git/commit
libkmod: fix buffer-overflow in weakdep_to_char
authorTobias Stoeckmann <tobias@stoeckmann.org>
Wed, 26 Mar 2025 14:51:22 +0000 (15:51 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Wed, 26 Mar 2025 16:39:42 +0000 (11:39 -0500)
commitbb8aa10a73eb274aec7401f2384dbabb98810820
treec207642fa23c4161bc816394b2afdcacdb23a615
parent8266349d839a7e72fd3bdfa4261e39c90b2d4a8d
libkmod: fix buffer-overflow in weakdep_to_char

Fix another buffer overflow which can happen if no weak dependencies
exist. Use the same logic as found in softdep_to_char to cover this
case as well.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Link: https://github.com/kmod-project/kmod/pull/327
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
libkmod/libkmod-config.c
testsuite/rootfs-pristine/test-weakdep/etc/modprobe.d/dumb-weakdep.conf
testsuite/rootfs-pristine/test-weakdep/modprobe-c.txt