debugedit-5.1-6.fc43

List of Findings

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Error: CPPCHECK_WARNING (CWE-457): [#def26]
debugedit-5.1/tools/debugedit.c:2325: error[uninitvar]: Uninitialized variables: &key.cu, &key.new_idx, &key.size_diff, &key.replace_dirs, &key.replace_files, &key.unit_length, &key.version, &key.header_length, &key.min_instr_len, &key.max_op_per_instr, &key.default_is_stmt, &key.line_base, &key.line_range, &key.opcode_base
# 2323|     struct line_table key;
# 2324|     key.old_idx = idx;
# 2325|->   struct line_table *table = bsearch (&key, lines->table,
# 2326|   				      lines->used,
# 2327|   				      sizeof (struct line_table),

Error: CPPCHECK_WARNING (CWE-476): [#def27]
debugedit-5.1/tools/debugedit.c:2527: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: comp_dir
# 2525|   			{
# 2526|   			  comp_dir = malloc (enddir - name + 1);
# 2527|-> 			  memcpy (comp_dir, name, enddir - name);
# 2528|   			  comp_dir [enddir - name] = '\0';
# 2529|   			}

Error: CPPCHECK_WARNING (CWE-476): [#def28]
debugedit-5.1/tools/debugedit.c:2528: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: comp_dir
# 2526|   			  comp_dir = malloc (enddir - name + 1);
# 2527|   			  memcpy (comp_dir, name, enddir - name);
# 2528|-> 			  comp_dir [enddir - name] = '\0';
# 2529|   			}
# 2530|   		      else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def29]
debugedit-5.1/tools/debugedit.c:3461:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fdopen_dso(fd,  file)’
debugedit-5.1/tools/debugedit.c:3672:1: enter_function: entry to ‘main’
debugedit-5.1/tools/debugedit.c:3730:6: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3736:17: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3736:6: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3742:7: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3774:6: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3779:7: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3779:6: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3785:20: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3792:6: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
debugedit-5.1/tools/debugedit.c:3797:9: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3797:9: call_function: calling ‘fdopen_dso’ from ‘main’
debugedit-5.1/tools/debugedit.c:3797:9: return_function: returning to ‘main’ from ‘fdopen_dso’
debugedit-5.1/tools/debugedit.c:3798:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3801:15: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3861:7: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3861:6: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3894:23: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3894:22: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3895:23: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3894:23: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3896:23: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3894:23: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3897:23: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3894:22: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3915:7: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3461:7: danger: ‘fdopen_dso(fd,  file)’ leaks here; was allocated at [(22)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/21)
# 3459|     size_t phnum;
# 3460|   
# 3461|->   if (dest_dir == NULL && (!do_build_id || no_recompute_build_id))
# 3462|       elf = elf_begin (fd, ELF_C_READ, NULL);
# 3463|     else

Error: GCC_ANALYZER_WARNING (CWE-457): [#def30]
debugedit-5.1/tools/debugedit.c:3533:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*dso.filename’
debugedit-5.1/tools/debugedit.c:3672:1: enter_function: entry to ‘main’
debugedit-5.1/tools/debugedit.c:3730:6: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3736:17: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3736:6: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3742:7: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3774:6: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3779:7: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3779:6: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3785:20: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3792:6: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
debugedit-5.1/tools/debugedit.c:3797:9: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3797:9: call_function: calling ‘fdopen_dso’ from ‘main’
# 3531|     if (dso)
# 3532|       {
# 3533|->       free ((char *) dso->filename);
# 3534|         destroy_strings (&dso->debug_str);
# 3535|         destroy_strings (&dso->debug_line_str);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def31]
debugedit-5.1/tools/debugedit.c:3805:15: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>.shdr[i].sh_type’
debugedit-5.1/tools/debugedit.c:3672:1: enter_function: entry to ‘main’
debugedit-5.1/tools/debugedit.c:3730:6: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3736:17: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3736:6: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3742:7: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3774:6: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3779:7: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3779:6: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3785:20: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3792:6: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
debugedit-5.1/tools/debugedit.c:3797:9: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3797:9: call_function: calling ‘fdopen_dso’ from ‘main’
debugedit-5.1/tools/debugedit.c:3797:9: return_function: returning to ‘main’ from ‘fdopen_dso’
debugedit-5.1/tools/debugedit.c:3798:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3801:15: branch_true: following ‘true’ branch...
debugedit-5.1/tools/debugedit.c:3805:15: branch_true: ...to here
debugedit-5.1/tools/debugedit.c:3805:15: danger: use of uninitialized value ‘*<unknown>.shdr[i].sh_type’ here
# 3803|         const char *name;
# 3804|   
# 3805|->       switch (dso->shdr[i].sh_type)
# 3806|   	{
# 3807|   	case SHT_MIPS_DWARF:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def32]
debugedit-5.1/tools/debugedit.c:4018:6: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
debugedit-5.1/tools/debugedit.c:3672:1: enter_function: entry to ‘main’
debugedit-5.1/tools/debugedit.c:3730:6: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3736:17: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3736:6: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3742:7: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3774:6: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3779:7: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3779:6: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3785:20: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3792:6: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
debugedit-5.1/tools/debugedit.c:3797:9: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3797:9: call_function: calling ‘fdopen_dso’ from ‘main’
debugedit-5.1/tools/debugedit.c:3797:9: return_function: returning to ‘main’ from ‘fdopen_dso’
debugedit-5.1/tools/debugedit.c:3798:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3801:15: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3861:7: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3861:6: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3894:23: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3894:22: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3895:23: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3894:23: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3896:23: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3894:23: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3897:23: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3894:22: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3915:7: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:4018:6: danger: ‘<unknown>’ leaks here; was allocated at [(28)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/27)
# 4016|       }
# 4017|   
# 4018|->   if (elf_update (dso->elf, ELF_C_NULL) < 0)
# 4019|       {
# 4020|         error (1, 0, "Failed to update file: %s", elf_errmsg (elf_errno ()));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def33]
debugedit-5.1/tools/debugedit.c:4040:6: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
debugedit-5.1/tools/debugedit.c:3672:1: enter_function: entry to ‘main’
debugedit-5.1/tools/debugedit.c:3730:6: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3736:17: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3736:6: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3742:7: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3774:6: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3779:7: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3779:6: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3785:20: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3792:6: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
debugedit-5.1/tools/debugedit.c:3797:9: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3797:9: call_function: calling ‘fdopen_dso’ from ‘main’
debugedit-5.1/tools/debugedit.c:3797:9: return_function: returning to ‘main’ from ‘fdopen_dso’
debugedit-5.1/tools/debugedit.c:3798:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3801:15: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3861:7: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3861:6: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3894:23: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3894:22: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3895:23: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3894:23: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3896:23: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3894:23: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3897:23: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:3894:22: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:3915:7: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:4018:6: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:4023:7: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:4029:6: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:4030:8: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:4029:8: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:4031:8: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:4029:8: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:4032:8: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:4029:8: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:4033:8: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:4029:8: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:4029:8: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:4029:8: branch_false: following ‘false’ branch (when ‘build_id’ is NULL)...
debugedit-5.1/tools/debugedit.c:4035:8: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:4029:7: branch_false: following ‘false’ branch...
debugedit-5.1/tools/debugedit.c:4040:7: branch_false: ...to here
debugedit-5.1/tools/debugedit.c:4040:6: danger: ‘<unknown>’ leaks here; was allocated at [(28)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/27)
# 4038|         error (1, 0, "Failed to write file: %s", elf_errmsg (elf_errno()));
# 4039|       }
# 4040|->   if (elf_end (dso->elf) < 0)
# 4041|       {
# 4042|         error (1, 0, "elf_end failed: %s", elf_errmsg (elf_errno()));

Error: CPPCHECK_WARNING (CWE-823): [#def34]
debugedit-5.1/tools/hashtab.c:186: error[arrayIndexOutOfBounds]: Array 'prime_tab[30]' accessed at index 30, which is out of bounds.
#  184|   
#  185|     /* If we've run out of primes, abort.  */
#  186|->   if (n > prime_tab[low].prime)
#  187|       {
#  188|         fprintf (stderr, "Cannot find prime bigger than %lu\n", n);

Scan Properties

analyzer-version-clippy1.86.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.0.1
analyzer-version-gcc-analyzer15.0.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-188.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namedebugedit-5.1-6.fc43
store-results-to/tmp/tmpbiom7atz/debugedit-5.1-6.fc43.tar.xz
time-created2025-04-25 12:24:19
time-finished2025-04-25 12:25:37
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpbiom7atz/debugedit-5.1-6.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpbiom7atz/debugedit-5.1-6.fc43.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9