]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
ldd: define the "unused" variable
authorAurelien Jarno <aurelien@aurel32.net>
Fri, 12 Sep 2025 19:18:41 +0000 (21:18 +0200)
committerAurelien Jarno <aurelien@aurel32.net>
Mon, 15 Sep 2025 18:52:23 +0000 (20:52 +0200)
The "unused" variable could be use unitialized, which is an issue if ldd
is ran with "-u". Fix that by defining the variable to an empty value,
just like it is already done for the bind_now, warn and verbose
variables.

Reported-by: Johan Palmqvist <johan.palmqvist@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
elf/ldd.bash.in

index 2d3df6e57ede80ecd744aecc95ec585ca1706c57..fdf67040120aa66e5303034940deed4f90302c24 100644 (file)
@@ -30,6 +30,7 @@ RTLDLIST=@RTLD@
 warn=
 bind_now=
 verbose=
+unused=
 
 while test $# -gt 0; do
   case "$1" in