debugedit-5.2-6.fc44

List of Findings

Error: SHELLCHECK_WARNING (CWE-569): [#def1]
/usr/bin/find-debuginfo:318:23: warning[SC1083]: This { is literal. Check expression (missing ;/\n?) or quote it.
#  316|   # RPM_ARCH to create an unique (dir) name. Warn if they aren't set.
#  317|   for n in RPM_BUILD_ROOT RPM_BUILD_DIR RPM_PACKAGE_NAME; do
#  318|->   if eval test -z \"\${$n-}\"; then
#  319|       echo >&2 "$n is not set"
#  320|       exit 1

Error: SHELLCHECK_WARNING (CWE-569): [#def2]
/usr/bin/find-debuginfo:318:27: warning[SC1083]: This } is literal. Check expression (missing ;/\n?) or quote it.
#  316|   # RPM_ARCH to create an unique (dir) name. Warn if they aren't set.
#  317|   for n in RPM_BUILD_ROOT RPM_BUILD_DIR RPM_PACKAGE_NAME; do
#  318|->   if eval test -z \"\${$n-}\"; then
#  319|       echo >&2 "$n is not set"
#  320|       exit 1

Error: SHELLCHECK_WARNING (CWE-569): [#def3]
/usr/bin/find-debuginfo:352:1: warning[SC2188]: This redirection doesn't have a command. Move to its command (or use 'true' as no-op).
#  350|   ELFBINSFILE="$BUILDDIR/elfbins.list"
#  351|   
#  352|-> > "$SOURCEFILE"
#  353|   > "$LISTFILE"
#  354|   > "$LINKSFILE"

Error: SHELLCHECK_WARNING (CWE-569): [#def4]
/usr/bin/find-debuginfo:353:1: warning[SC2188]: This redirection doesn't have a command. Move to its command (or use 'true' as no-op).
#  351|   
#  352|   > "$SOURCEFILE"
#  353|-> > "$LISTFILE"
#  354|   > "$LINKSFILE"
#  355|   > "$ELFBINSFILE"

Error: SHELLCHECK_WARNING (CWE-569): [#def5]
/usr/bin/find-debuginfo:354:1: warning[SC2188]: This redirection doesn't have a command. Move to its command (or use 'true' as no-op).
#  352|   > "$SOURCEFILE"
#  353|   > "$LISTFILE"
#  354|-> > "$LINKSFILE"
#  355|   > "$ELFBINSFILE"
#  356|   

Error: SHELLCHECK_WARNING (CWE-569): [#def6]
/usr/bin/find-debuginfo:355:1: warning[SC2188]: This redirection doesn't have a command. Move to its command (or use 'true' as no-op).
#  353|   > "$LISTFILE"
#  354|   > "$LINKSFILE"
#  355|-> > "$ELFBINSFILE"
#  356|   
#  357|   debugdir="${RPM_BUILD_ROOT}/usr/lib/debug"

Error: SHELLCHECK_WARNING (CWE-571): [#def7]
/usr/bin/find-debuginfo:381:9: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  379|     local binary="$2"
#  380|   
#  381|->   local dynsyms=`mktemp`
#  382|     local funcsyms=`mktemp`
#  383|     local keep_symbols=`mktemp`

Error: SHELLCHECK_WARNING (CWE-571): [#def8]
/usr/bin/find-debuginfo:382:9: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  380|   
#  381|     local dynsyms=`mktemp`
#  382|->   local funcsyms=`mktemp`
#  383|     local keep_symbols=`mktemp`
#  384|     local mini_debuginfo=`mktemp`

Error: SHELLCHECK_WARNING (CWE-571): [#def9]
/usr/bin/find-debuginfo:383:9: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  381|     local dynsyms=`mktemp`
#  382|     local funcsyms=`mktemp`
#  383|->   local keep_symbols=`mktemp`
#  384|     local mini_debuginfo=`mktemp`
#  385|   

Error: SHELLCHECK_WARNING (CWE-571): [#def10]
/usr/bin/find-debuginfo:384:9: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  382|     local funcsyms=`mktemp`
#  383|     local keep_symbols=`mktemp`
#  384|->   local mini_debuginfo=`mktemp`
#  385|   
#  386|     # In the minisymtab we don't need the .debug_ sections (already removed

Error: SHELLCHECK_WARNING (CWE-571): [#def11]
/usr/bin/find-debuginfo:392:9: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  390|     # too aggressive. Field $2 is the section name, $3 is the section type
#  391|     # and $8 are the section flags.
#  392|->   local remove_sections=`${READELF} -W -S "$debuginfo" \
#  393|   	| awk '{ if (index($2,".debug_") != 1 \
#  394|   		     && ($3 == "PROGBITS" || $3 == "NOTE" || $3 == "NOBITS") \

Error: SHELLCHECK_WARNING (CWE-398): [#def12]
/usr/bin/find-debuginfo:487:12: warning[SC2229]: This does not read 'var'. Remove $/${} for that, or use ${var?} to quiet.
#  485|         continue
#  486|       else
#  487|->       read "$var" < <(echo 1)
#  488|       fi
#  489|     fi

Error: SHELLCHECK_WARNING (CWE-571): [#def13]
/usr/bin/find-debuginfo:530:17: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  528|             $verbose && echo "considering ${f#$RPM_BUILD_DIR/} ${member} size ${size} at ${offset}"
#  529|             local tmpdir="$temp/$inum-archive-member" # super short lived
#  530|->           local member_dn=$(dirname "$member")
#  531|             if [ "$member_dn" = "." ]; then
#  532|                 member_dn="" # empty

Error: SHELLCHECK_WARNING (CWE-571): [#def14]
/usr/bin/find-debuginfo:536:17: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  534|                 member_dn="${member_dn}/" # or suffixed with /
#  535|             fi
#  536|->           local member_bn=$(basename "$member")
#  537|   
#  538|             # (re)create a directory to hold the (pathname-inclusive) member

Error: SHELLCHECK_WARNING (CWE-252): [#def15]
/usr/bin/find-debuginfo:545:12: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#  543|             # distinct instance-number would have to be given to ar ("N ###"),
#  544|             # kept on a per-name basis.
#  545|->           (cd "$tmpdir";
#  546|              if [ "$dd_skip_bytes" = "yes" ]; then
#  547|   	    # Use blocksize of 64k, skip and count are still in bytes.

Error: SHELLCHECK_WARNING (CWE-252): [#def16]
/usr/bin/find-debuginfo:574:12: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#  572|   
#  573|             # add the file; qP mode, so strict append, no dupe elimination, path preserved
#  574|->           (cd "$tmpdir"; ${AR} qP "$tmpa"  "$member_dn$member_bn")
#  575|   
#  576|             # remove the entire temporary directory, in case another

Error: SHELLCHECK_WARNING (CWE-156): [#def17]
/usr/bin/find-debuginfo:591:26: warning[SC2046]: Quote this to prevent word splitting.
#  589|     rm -f "$tmpa"
#  590|     
#  591|->   $verbose && echo found $(tr -dc '\0' < "$SOURCEFILE" | wc -c) source files
#  592|   
#  593|     # NB: no need to strip or dwz-compress or gdbindex or

Error: SHELLCHECK_WARNING (CWE-156): [#def18]
/usr/bin/find-debuginfo:655:26: warning[SC2046]: Quote this to prevent word splitting.
#  653|     fi
#  654|   
#  655|->   $verbose && echo found $(tr -dc '\0' < "$SOURCEFILE" | wc -c) source files
#  656|     
#  657|     # debugedit makes sure to to get write permission to the file and

Error: SHELLCHECK_WARNING (CWE-569): [#def19]
/usr/bin/find-debuginfo:761:3: warning[SC2188]: This redirection doesn't have a command. Move to its command (or use 'true' as no-op).
#  759|     local res=0
#  760|   
#  761|->   >"$SOURCEFILE"
#  762|     >"$ELFBINSFILE"
#  763|     # can't use read -n <n>, because it reads bytes one by one, allowing for

Error: SHELLCHECK_WARNING (CWE-569): [#def20]
/usr/bin/find-debuginfo:762:3: warning[SC2188]: This redirection doesn't have a command. Move to its command (or use 'true' as no-op).
#  760|   
#  761|     >"$SOURCEFILE"
#  762|->   >"$ELFBINSFILE"
#  763|     # can't use read -n <n>, because it reads bytes one by one, allowing for
#  764|     # races

Error: SHELLCHECK_WARNING (CWE-156): [#def21]
/usr/bin/find-debuginfo:770:13: warning[SC2046]: Quote this to prevent word splitting.
#  768|         break
#  769|       fi
#  770|->     do_file $(sed -n "$(( 0x$filenum )) p" "$temp/primary")
#  771|       res=$?
#  772|       if [ $res != 0 ]; then

Error: SHELLCHECK_WARNING (CWE-252): [#def22]
/usr/bin/find-debuginfo:821:27: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#  819|   if $run_dwz \
#  820|      && [ -d "${RPM_BUILD_ROOT}/usr/lib/debug" ]; then
#  821|->   readarray dwz_files < <(cd "${RPM_BUILD_ROOT}/usr/lib/debug"; find -type f -name \*.debug | LC_ALL=C sort)
#  822|     if [ ${#dwz_files[@]} -gt 0 ]; then
#  823|       $quiet || echo "DWARF-compressing ${#dwz_files[@]} files" 2>&1

Error: SHELLCHECK_WARNING: [#def23]
/usr/bin/find-debuginfo:834:11: error[SC2157]: Argument to -n is always true due to literal strings.
#  832|       dwz_multifile_name="${dwz_multifile_name}${dwz_multifile_suffix}"
#  833|       dwz_opts="-h -q -r"
#  834|->     [ -n "-j" ] && dwz_opts="${dwz_opts} -j ${n_jobs}"
#  835|       [ ${#dwz_files[@]} -gt 1 ] && [ "$dwz_single_file_mode" = "false" ] \
#  836|         && dwz_opts="${dwz_opts} -m .dwz/${dwz_multifile_name}"

Error: SHELLCHECK_WARNING (CWE-88): [#def24]
/usr/bin/find-debuginfo:843:63: error[SC2068]: Double quote array expansions to avoid re-splitting elements.
#  841|         && dwz_opts="${dwz_opts} -L ${dwz_max_die_limit}"
#  842|       if type dwz >/dev/null 2>&1; then
#  843|->       ( cd "${RPM_BUILD_ROOT}/usr/lib/debug" && dwz $dwz_opts ${dwz_files[@]} )
#  844|       else
#  845|         echo >&2 "*** ERROR: DWARF compression requested, but no dwz installed"

Error: SHELLCHECK_WARNING (CWE-252): [#def25]
/usr/bin/find-debuginfo:855:6: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#  853|       # dwz invalidates .gnu_debuglink CRC32 in the main files.
#  854|       cat "$ELFBINSFILE" |
#  855|->     (cd "$RPM_BUILD_ROOT"; \
#  856|        tr '\n' '\0' | xargs -0 sepdebugcrcfix usr/lib/debug)
#  857|     fi

Error: SHELLCHECK_WARNING (CWE-252): [#def26]
/usr/bin/find-debuginfo:891:4: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#  889|     # directory (which is why we match against ^ or /).
#  890|     LC_ALL=C sort -z -u "$SOURCEFILE" | grep -E -v -z '(^|/)<[a-z _-]+>$' |
#  891|->   (cd "${debug_base_name}"; cpio -pd0mL --quiet "${RPM_BUILD_ROOT}${debug_dest_name}")
#  892|     # stupid cpio creates new directories in mode 0700,
#  893|     # and non-standard modes may be inherented from original directories, fixup

Error: SHELLCHECK_WARNING (CWE-252): [#def27]
/usr/bin/find-debuginfo:901:4: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#  899|     ((nout > 0)) ||
#  900|     test ! -d "${RPM_BUILD_ROOT}/usr/lib" ||
#  901|->   (cd "${RPM_BUILD_ROOT}/usr/lib"; find debug -type d) |
#  902|     sed 's,^,%dir /usr/lib/,' >> "$LISTFILE"
#  903|   

Error: SHELLCHECK_WARNING (CWE-252): [#def28]
/usr/bin/find-debuginfo:904:4: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#  902|     sed 's,^,%dir /usr/lib/,' >> "$LISTFILE"
#  903|   
#  904|->   (cd "${RPM_BUILD_ROOT}/usr"
#  905|      test ! -d lib/debug || find lib/debug ! -type d
#  906|      test ! -d src/debug -o -n "$srcout" || find src/debug -mindepth 1 -maxdepth 1

Error: SHELLCHECK_WARNING (CWE-569): [#def29]
/usr/bin/find-debuginfo:912:3: warning[SC2188]: This redirection doesn't have a command. Move to its command (or use 'true' as no-op).
#  910|   if [ -n "$srcout" ]; then
#  911|     srcout="$BUILDDIR/$srcout"
#  912|->   > "$srcout"
#  913|     if [ -d "${RPM_BUILD_ROOT}/usr/src/debug" ]; then
#  914|       (cd "${RPM_BUILD_ROOT}/usr"

Error: SHELLCHECK_WARNING (CWE-252): [#def30]
/usr/bin/find-debuginfo:914:6: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#  912|     > "$srcout"
#  913|     if [ -d "${RPM_BUILD_ROOT}/usr/src/debug" ]; then
#  914|->     (cd "${RPM_BUILD_ROOT}/usr"
#  915|        find src/debug -mindepth 1 -maxdepth 1
#  916|       ) | sed 's,^,/usr/,' >> "$srcout"

Error: SHELLCHECK_WARNING (CWE-569): [#def31]
/usr/bin/find-debuginfo:967:3: warning[SC2188]: This redirection doesn't have a command. Move to its command (or use 'true' as no-op).
#  965|   i=0
#  966|   while ((i < nout)); do
#  967|->   > ${outs[$i]}
#  968|     filtered_list ${outs[$i]} ${lists[$i]}
#  969|     pattern_list ${outs[$i]} "${ptns[$i]}"

Error: GCC_ANALYZER_WARNING (CWE-457): [#def32]
debugedit-5.2/tools/debugedit.c:3547:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*dso.filename’
debugedit-5.2/tools/debugedit.c:3686:1: enter_function: entry to ‘main’
debugedit-5.2/tools/debugedit.c:3748:6: branch_false: following ‘false’ branch...
debugedit-5.2/tools/debugedit.c:3754:17: branch_false: ...to here
debugedit-5.2/tools/debugedit.c:3754:6: branch_false: following ‘false’ branch...
debugedit-5.2/tools/debugedit.c:3760:7: branch_false: ...to here
debugedit-5.2/tools/debugedit.c:3792:6: branch_false: following ‘false’ branch...
debugedit-5.2/tools/debugedit.c:3797:7: branch_false: ...to here
debugedit-5.2/tools/debugedit.c:3797:6: branch_false: following ‘false’ branch...
debugedit-5.2/tools/debugedit.c:3803:20: branch_false: ...to here
debugedit-5.2/tools/debugedit.c:3810:6: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
debugedit-5.2/tools/debugedit.c:3815:9: branch_false: ...to here
debugedit-5.2/tools/debugedit.c:3815:9: call_function: calling ‘fdopen_dso’ from ‘main’
# 3545|     if (dso)
# 3546|       {
# 3547|->       free ((char *) dso->filename);
# 3548|         destroy_strings (&dso->debug_str);
# 3549|         destroy_strings (&dso->debug_line_str);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def33]
debugedit-5.2/tools/debugedit.c:3823:15: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>.shdr[i].sh_type’
debugedit-5.2/tools/debugedit.c:3686:1: enter_function: entry to ‘main’
debugedit-5.2/tools/debugedit.c:3748:6: branch_false: following ‘false’ branch...
debugedit-5.2/tools/debugedit.c:3754:17: branch_false: ...to here
debugedit-5.2/tools/debugedit.c:3754:6: branch_false: following ‘false’ branch...
debugedit-5.2/tools/debugedit.c:3760:7: branch_false: ...to here
debugedit-5.2/tools/debugedit.c:3792:6: branch_false: following ‘false’ branch...
debugedit-5.2/tools/debugedit.c:3797:7: branch_false: ...to here
debugedit-5.2/tools/debugedit.c:3797:6: branch_false: following ‘false’ branch...
debugedit-5.2/tools/debugedit.c:3803:20: branch_false: ...to here
debugedit-5.2/tools/debugedit.c:3810:6: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
debugedit-5.2/tools/debugedit.c:3815:9: branch_false: ...to here
debugedit-5.2/tools/debugedit.c:3815:9: call_function: calling ‘fdopen_dso’ from ‘main’
debugedit-5.2/tools/debugedit.c:3815:9: return_function: returning to ‘main’ from ‘fdopen_dso’
debugedit-5.2/tools/debugedit.c:3816:6: branch_false: following ‘false’ branch...
debugedit-5.2/tools/debugedit.c:3816:6: branch_false: ...to here
debugedit-5.2/tools/debugedit.c:3819:15: branch_true: following ‘true’ branch...
debugedit-5.2/tools/debugedit.c:3823:15: branch_true: ...to here
debugedit-5.2/tools/debugedit.c:3823:15: danger: use of uninitialized value ‘*<unknown>.shdr[i].sh_type’ here
# 3821|         const char *name;
# 3822|   
# 3823|->       switch (dso->shdr[i].sh_type)
# 3824|   	{
# 3825|   	case SHT_MIPS_DWARF:

Scan Properties

analyzer-version-clippy1.95.0
analyzer-version-cppcheck2.20.0
analyzer-version-gcc16.1.1
analyzer-version-gcc-analyzer16.1.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-127.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namedebugedit-5.2-6.fc44
store-results-to/tmp/tmpj36edpf6/debugedit-5.2-6.fc44.tar.xz
time-created2026-06-01 11:44:07
time-finished2026-06-01 11:46:01
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'shellcheck,cppcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmpj36edpf6/debugedit-5.2-6.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpj36edpf6/debugedit-5.2-6.fc44.src.rpm'
tool-versioncsmock-3.8.5.20260529.133039.g6f3b5c6-1.el9