Task #132086 - libgpg-error-1.58-2.fc44/scan-results.err
back to task #132086download
Error: SHELLCHECK_WARNING (CWE-563):
/usr/bin/gpg-error-config:15:1: warning[SC2034]: includedir appears unused. Verify use (or export if used externally).
# 13| prefix=/usr
# 14| exec_prefix=/usr
# 15|-> includedir=/usr/include
# 16| libdir=/usr/lib
# 17|
Error: SHELLCHECK_WARNING (CWE-563):
/usr/bin/gpg-error-config:16:1: warning[SC2034]: libdir appears unused. Verify use (or export if used externally).
# 14| exec_prefix=/usr
# 15| includedir=/usr/include
# 16|-> libdir=/usr/lib
# 17|
# 18| if echo "$0" | grep gpg-error-config 2>/dev/null >/dev/null; then
Error: SHELLCHECK_WARNING (CWE-563):
/usr/bin/gpg-error-config:52:6: warning[SC2034]: optarg appears unused. Verify use (or export if used externally).
# 50| ;;
# 51| *)
# 52|-> optarg=
# 53| ;;
# 54| esac
Error: SHELLCHECK_WARNING (CWE-569):
/usr/bin/gpgrt-config:121:3: warning[SC2221]: This pattern always overrides a later one on line 132.
# 119| if [ -n "$_reading_attrs" ]; then
# 120| case "$_line" in
# 121|-> *:\ *)
# 122| _key="${_line%%:\ *}"
# 123| _value="${_line#*:\ }"
Error: SHELLCHECK_WARNING (CWE-569):
/usr/bin/gpgrt-config:132:6: warning[SC2222]: This pattern never matches because of a previous pattern on line 121.
# 130| EOF2
# 131| ;;
# 132|-> *:|*:\ ) ;;
# 133| *)
# 134| echo "Error reading $_filename: $_line" 1>&2
Error: SHELLCHECK_WARNING (CWE-563):
/usr/bin/gpgrt-config:597:5: warning[SC2034]: VAR_pc_sysrootdir appears unused. Verify use (or export if used externally).
# 595| VAR_pc_sysrootdir="/"
# 596| else
# 597|-> VAR_pc_sysrootdir="$PKG_CONFIG_SYSROOT_DIR"
# 598| fi
# 599|
Error: SHELLCHECK_WARNING (CWE-156):
/usr/bin/gpgrt-config:696:42: warning[SC2046]: Quote this to prevent word splitting.
# 694| if [ -z "$want_var" ] && [ -z "$want_attr" ]; then
# 695| if [ -n "$want_cflags" ]; then
# 696|-> output="$output${output:+ }$(sysroot -I $(list_only_once $cflags))"
# 697| # Backward compatibility to old gpg-error-config
# 698| if [ $mt = yes ] && [ -n "$mtcflags" ]; then
Error: SHELLCHECK_WARNING (CWE-156):
/usr/bin/gpgrt-config:703:42: warning[SC2046]: Quote this to prevent word splitting.
# 701| fi
# 702| if [ -n "$want_libs" ]; then
# 703|-> output="$output${output:+ }$(sysroot -L $(list_only_once_for_libs $libs))"
# 704| # Backward compatibility to old gpg-error-config
# 705| if [ $mt = yes ] && [ -n "$mtlibs" ]; then
Error: CPPCHECK_WARNING (CWE-457):
libgpg-error-1.58/src/argparse.c:1694: error[legacyUninitvar]: Uninitialized variable: keyword
# 1692| for (idx=0; idx < nopts; idx++ )
# 1693| {
# 1694|-> if (opts[idx].long_opt && !strcmp (opts[idx].long_opt, keyword))
# 1695| break;
# 1696| }
Error: CPPCHECK_WARNING (CWE-476):
libgpg-error-1.58/src/logging.c:272: error[nullPointer]: Null pointer dereference: (struct sockaddr_un*)0
# 270| srvr_addr_un.sun_path[sizeof (srvr_addr_un.sun_path)-1] = 0;
# 271| srvr_addr = (struct sockaddr *)&srvr_addr_un;
# 272|-> addrlen = SUN_LEN (&srvr_addr_un);
# 273| name_for_err = srvr_addr_un.sun_path;
# 274| }
Error: CPPCHECK_WARNING (CWE-476):
libgpg-error-1.58/src/logging.c:284: error[nullPointer]: Null pointer dereference: (struct sockaddr_un*)0
# 282| srvr_addr_un.sun_path[sizeof (srvr_addr_un.sun_path)-1] = 0;
# 283| srvr_addr = (struct sockaddr *)&srvr_addr_un;
# 284|-> addrlen = SUN_LEN (&srvr_addr_un);
# 285| }
# 286| }
Error: GCC_ANALYZER_WARNING (CWE-126):
libgpg-error-1.58/src/logging.c:488:52: warning[-Wanalyzer-out-of-bounds]: buffer over-read
libgpg-error-1.58/src/logging.c:1331:1: enter_function: entry to '_gpgrt_logv_clock'
libgpg-error-1.58/src/logging.c:1357:3: call_function: calling '_gpgrt_logv_internal' from '_gpgrt_logv_clock'
# 486| goto leave;
# 487| }
# 488|-> else if (name && !strncmp (name, "tcp://", 6) && name[6])
# 489| want_socket = 1;
# 490| #ifndef HAVE_W32_SYSTEM
Error: CPPCHECK_WARNING (CWE-664):
libgpg-error-1.58/src/logging.c:1324: error[va_list_usedBeforeStarted]: va_list 'dummy_argptr' used before va_start() was called.
# 1322| static va_list dummy_argptr;
# 1323|
# 1324|-> _gpgrt_logv_printhex (buffer, length, NULL, dummy_argptr);
# 1325| }
# 1326| }
Error: GCC_ANALYZER_WARNING (CWE-775):
libgpg-error-1.58/src/spawn-posix.c:412:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'dup2(*act.fd[i], i)'
libgpg-error-1.58/src/spawn-posix.c:404:15: branch_true: following 'true' branch (when 'i != 3')...
libgpg-error-1.58/src/spawn-posix.c:405:9: branch_true: ...to here
libgpg-error-1.58/src/spawn-posix.c:405:8: branch_false: following 'false' branch...
libgpg-error-1.58/src/spawn-posix.c:404:23: branch_false: ...to here
libgpg-error-1.58/src/spawn-posix.c:405:8: branch_false: following 'false' branch...
libgpg-error-1.58/src/spawn-posix.c:404:23: branch_false: ...to here
libgpg-error-1.58/src/spawn-posix.c:409:15: branch_true: following 'true' branch (when 'i != 3')...
libgpg-error-1.58/src/spawn-posix.c:410:9: branch_true: ...to here
libgpg-error-1.58/src/spawn-posix.c:410:8: branch_true: following 'true' branch...
libgpg-error-1.58/src/spawn-posix.c:412:13: branch_true: ...to here
libgpg-error-1.58/src/spawn-posix.c:412:13: acquire_resource: opened here
libgpg-error-1.58/src/spawn-posix.c:412:12: danger: 'dup2(*act.fd[i], i)' leaks here; was opened at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
# 410| if (act->fd[i] != i)
# 411| {
# 412|-> if (dup2 (act->fd[i], i) == -1)
# 413| _gpgrt_log_fatal ("dup2 std%s failed: %s\n",
# 414| i==0?"in":i==1?"out":"err", strerror (errno));
Error: GCC_ANALYZER_WARNING (CWE-775):
libgpg-error-1.58/src/spawn-posix.c:614:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd_in[0]'
libgpg-error-1.58/src/spawn-posix.c:573:1: enter_function: entry to '_gpgrt_process_spawn'
libgpg-error-1.58/src/spawn-posix.c:613:6: branch_false: following 'false' branch...
libgpg-error-1.58/src/spawn-posix.c:615:6: branch_false: ...to here
libgpg-error-1.58/src/spawn-posix.c:626:6: branch_false: following 'false' branch...
libgpg-error-1.58/src/spawn-posix.c:653:13: branch_false: ...to here
libgpg-error-1.58/src/spawn-posix.c:654:6: branch_false: following 'false' branch...
libgpg-error-1.58/src/spawn-posix.c:660:3: branch_false: ...to here
libgpg-error-1.58/src/spawn-posix.c:663:6: branch_false: following 'false' branch...
libgpg-error-1.58/src/spawn-posix.c:677:11: branch_false: ...to here
libgpg-error-1.58/src/spawn-posix.c:677:10: branch_true: following 'true' branch...
libgpg-error-1.58/src/spawn-posix.c:679:16: branch_true: ...to here
libgpg-error-1.58/src/spawn-posix.c:679:16: call_function: calling 'do_create_pipe' from '_gpgrt_process_spawn'
libgpg-error-1.58/src/spawn-posix.c:679:16: return_function: returning to '_gpgrt_process_spawn' from 'do_create_pipe'
libgpg-error-1.58/src/spawn-posix.c:680:14: branch_false: following 'false' branch...
libgpg-error-1.58/src/spawn-posix.c:698:11: branch_false: ...to here
libgpg-error-1.58/src/spawn-posix.c:700:16: call_function: calling 'do_create_pipe' from '_gpgrt_process_spawn'
libgpg-error-1.58/src/spawn-posix.c:700:16: return_function: returning to '_gpgrt_process_spawn' from 'do_create_pipe'
libgpg-error-1.58/src/spawn-posix.c:703:18: branch_false: following 'false' branch...
libgpg-error-1.58/src/spawn-posix.c:705:19: branch_false: ...to here
libgpg-error-1.58/src/spawn-posix.c:705:18: branch_false: following 'false' branch...
libgpg-error-1.58/src/spawn-posix.c:707:15: branch_false: ...to here
libgpg-error-1.58/src/spawn-posix.c:614:12: danger: 'fd_in[0]' leaks here
# 612| argv = xtrycalloc (i+2, sizeof *argv);
# 613| if (!argv)
# 614|-> return _gpg_err_code_from_syserror ();
# 615| if (pgmname)
# 616| argv[0] = strrchr (pgmname, '/');
Error: GCC_ANALYZER_WARNING (CWE-775):
libgpg-error-1.58/src/spawn-posix.c:614:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd_in[1]'
libgpg-error-1.58/src/spawn-posix.c:573:1: enter_function: entry to '_gpgrt_process_spawn'
libgpg-error-1.58/src/spawn-posix.c:613:6: branch_false: following 'false' branch...
libgpg-error-1.58/src/spawn-posix.c:615:6: branch_false: ...to here
libgpg-error-1.58/src/spawn-posix.c:626:6: branch_false: following 'false' branch...
libgpg-error-1.58/src/spawn-posix.c:653:13: branch_false: ...to here
libgpg-error-1.58/src/spawn-posix.c:654:6: branch_false: following 'false' branch...
libgpg-error-1.58/src/spawn-posix.c:660:3: branch_false: ...to here
libgpg-error-1.58/src/spawn-posix.c:663:6: branch_false: following 'false' branch...
libgpg-error-1.58/src/spawn-posix.c:677:11: branch_false: ...to here
libgpg-error-1.58/src/spawn-posix.c:677:10: branch_true: following 'true' branch...
libgpg-error-1.58/src/spawn-posix.c:679:16: branch_true: ...to here
libgpg-error-1.58/src/spawn-posix.c:679:16: call_function: calling 'do_create_pipe' from '_gpgrt_process_spawn'
libgpg-error-1.58/src/spawn-posix.c:679:16: return_function: returning to '_gpgrt_process_spawn' from 'do_create_pipe'
libgpg-error-1.58/src/spawn-posix.c:680:14: branch_false: following 'false' branch...
libgpg-error-1.58/src/spawn-posix.c:698:11: branch_false: ...to here
libgpg-error-1.58/src/spawn-posix.c:700:16: call_function: calling 'do_create_pipe' from '_gpgrt_process_spawn'
libgpg-error-1.58/src/spawn-posix.c:700:16: return_function: returning to '_gpgrt_process_spawn' from 'do_create_pipe'
libgpg-error-1.58/src/spawn-posix.c:703:18: branch_false: following 'false' branch...
libgpg-error-1.58/src/spawn-posix.c:705:19: branch_false: ...to here
libgpg-error-1.58/src/spawn-posix.c:705:18: branch_false: following 'false' branch...
libgpg-error-1.58/src/spawn-posix.c:707:15: branch_false: ...to here
libgpg-error-1.58/src/spawn-posix.c:614:12: danger: 'fd_in[1]' leaks here
# 612| argv = xtrycalloc (i+2, sizeof *argv);
# 613| if (!argv)
# 614|-> return _gpg_err_code_from_syserror ();
# 615| if (pgmname)
# 616| argv[0] = strrchr (pgmname, '/');
Error: GCC_ANALYZER_WARNING (CWE-775):
libgpg-error-1.58/src/spawn-posix.c:614:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd_out[1]'
libgpg-error-1.58/src/spawn-posix.c:573:1: enter_function: entry to '_gpgrt_process_spawn'
libgpg-error-1.58/src/spawn-posix.c:613:6: branch_false: following 'false' branch...
libgpg-error-1.58/src/spawn-posix.c:615:6: branch_false: ...to here
libgpg-error-1.58/src/spawn-posix.c:626:6: branch_false: following 'false' branch...
libgpg-error-1.58/src/spawn-posix.c:653:13: branch_false: ...to here
libgpg-error-1.58/src/spawn-posix.c:654:6: branch_false: following 'false' branch...
libgpg-error-1.58/src/spawn-posix.c:660:3: branch_false: ...to here
libgpg-error-1.58/src/spawn-posix.c:663:6: branch_true: following 'true' branch...
libgpg-error-1.58/src/spawn-posix.c:665:12: branch_true: ...to here
libgpg-error-1.58/src/spawn-posix.c:666:10: branch_false: following 'false' branch...
libgpg-error-1.58/src/spawn-posix.c:672:19: branch_false: ...to here
libgpg-error-1.58/src/spawn-posix.c:673:19: acquire_resource: opened here
libgpg-error-1.58/src/spawn-posix.c:726:12: call_function: calling 'do_create_pipe' from '_gpgrt_process_spawn'
libgpg-error-1.58/src/spawn-posix.c:726:12: return_function: returning to '_gpgrt_process_spawn' from 'do_create_pipe'
libgpg-error-1.58/src/spawn-posix.c:731:14: branch_false: following 'false' branch...
libgpg-error-1.58/src/spawn-posix.c:733:15: branch_false: ...to here
libgpg-error-1.58/src/spawn-posix.c:733:14: branch_false: following 'false' branch...
libgpg-error-1.58/src/spawn-posix.c:735:15: branch_false: ...to here
libgpg-error-1.58/src/spawn-posix.c:735:14: branch_false: following 'false' branch...
libgpg-error-1.58/src/spawn-posix.c:737:11: branch_false: ...to here
libgpg-error-1.58/src/spawn-posix.c:614:12: danger: 'fd_out[1]' leaks here; was opened at [(12)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/11)
# 612| argv = xtrycalloc (i+2, sizeof *argv);
# 613| if (!argv)
# 614|-> return _gpg_err_code_from_syserror ();
# 615| if (pgmname)
# 616| argv[0] = strrchr (pgmname, '/');