File: git-ldd-set-u.diff

package info (click to toggle)
glibc 2.42-6
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 312,360 kB
  • sloc: ansic: 1,060,858; asm: 238,416; makefile: 20,960; python: 13,509; sh: 11,828; cpp: 5,188; awk: 1,794; perl: 317; yacc: 292; pascal: 182; sed: 19
file content (26 lines) | stat: -rw-r--r-- 764 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
commit 13d67746cbe1273afaf6b9de9d6065ab76ee7697
Author: Aurelien Jarno <aurelien@aurel32.net>
Date:   Fri Sep 12 21:18:41 2025 +0200

    ldd: define the "unused" variable
    
    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>

diff --git a/elf/ldd.bash.in b/elf/ldd.bash.in
index 2d3df6e57e..fdf6704012 100644
--- a/elf/ldd.bash.in
+++ b/elf/ldd.bash.in
@@ -30,6 +30,7 @@ RTLDLIST=@RTLD@
 warn=
 bind_now=
 verbose=
+unused=
 
 while test $# -gt 0; do
   case "$1" in