]> git.ipfire.org Git - thirdparty/glibc.git/commit
elf: Fix alloca size in _dl_debug_vdprintf
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Tue, 11 Oct 2022 13:22:35 +0000 (14:22 +0100)
committerSzabolcs Nagy <szabolcs.nagy@arm.com>
Thu, 27 Oct 2022 13:46:47 +0000 (14:46 +0100)
commit4197d863dee1894831759bc8c4543f0f05d26fd9
tree1e58c2417611159f63a52463f22e2b89df116908
parent01359abab8f5b7f44e6aa4260eb5f3f878d7ff4a
elf: Fix alloca size in _dl_debug_vdprintf

The alloca size did not consider the optional width parameter for
padding which could cause buffer underflow. The width is currently used
e.g. by _dl_map_object_from_fd which passes 2 * sizeof(void *) which
can be larger than the alloca buffer size on targets where
sizeof(void *) >= 2 * sizeof(unsigned long).

Even if large width is not used on existing targets it is better to fix
the formatting code to avoid surprises.
elf/dl-printf.c