libgpg-error-1.48-1.fc40
List of Defects
Error: CPPCHECK_WARNING: [#def1]
libgpg-error-1.48-build/libgpg-error-1.48/doc/yat2m.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def2]
libgpg-error-1.48-build/libgpg-error-1.48/src/argparse.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def3]
libgpg-error-1.48-build/libgpg-error-1.48/src/argparse.c:1122:15: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
# 1120| }
# 1121| else if (!strcmp (op, "="))
# 1122|-> result = !strcmp (str1, str2);
# 1123| else if (!strcmp (op, "<>"))
# 1124| result = !!strcmp (str1, str2);
Error: CLANG_WARNING: [#def4]
libgpg-error-1.48-build/libgpg-error-1.48/src/argparse.c:1124:16: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
# 1122| result = !strcmp (str1, str2);
# 1123| else if (!strcmp (op, "<>"))
# 1124|-> result = !!strcmp (str1, str2);
# 1125| else if (!strcmp (op, "=~"))
# 1126| result = !!strstr (str1, str2);
Error: CLANG_WARNING: [#def5]
libgpg-error-1.48-build/libgpg-error-1.48/src/argparse.c:1126:16: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
# 1124| result = !!strcmp (str1, str2);
# 1125| else if (!strcmp (op, "=~"))
# 1126|-> result = !!strstr (str1, str2);
# 1127| else if (!strcmp (op, "!~"))
# 1128| result = !strstr (str1, str2);
Error: CLANG_WARNING: [#def6]
libgpg-error-1.48-build/libgpg-error-1.48/src/argparse.c:1128:15: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
# 1126| result = !!strstr (str1, str2);
# 1127| else if (!strcmp (op, "!~"))
# 1128|-> result = !strstr (str1, str2);
# 1129| else if (!strcmp (op, "-le"))
# 1130| result = (strcmp (str1, str2) <= 0);
Error: CLANG_WARNING: [#def7]
libgpg-error-1.48-build/libgpg-error-1.48/src/argparse.c:1130:15: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
# 1128| result = !strstr (str1, str2);
# 1129| else if (!strcmp (op, "-le"))
# 1130|-> result = (strcmp (str1, str2) <= 0);
# 1131| else if (!strcmp (op, "-lt"))
# 1132| result = (strcmp (str1, str2) < 0);
Error: CLANG_WARNING: [#def8]
libgpg-error-1.48-build/libgpg-error-1.48/src/argparse.c:1132:15: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
# 1130| result = (strcmp (str1, str2) <= 0);
# 1131| else if (!strcmp (op, "-lt"))
# 1132|-> result = (strcmp (str1, str2) < 0);
# 1133| else if (!strcmp (op, "-gt"))
# 1134| result = (strcmp (str1, str2) > 0);
Error: CLANG_WARNING: [#def9]
libgpg-error-1.48-build/libgpg-error-1.48/src/argparse.c:1134:15: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
# 1132| result = (strcmp (str1, str2) < 0);
# 1133| else if (!strcmp (op, "-gt"))
# 1134|-> result = (strcmp (str1, str2) > 0);
# 1135| else if (!strcmp (op, "-ge"))
# 1136| result = (strcmp (str1, str2) >= 0);
Error: CLANG_WARNING: [#def10]
libgpg-error-1.48-build/libgpg-error-1.48/src/argparse.c:1136:15: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
# 1134| result = (strcmp (str1, str2) > 0);
# 1135| else if (!strcmp (op, "-ge"))
# 1136|-> result = (strcmp (str1, str2) >= 0);
# 1137| else if (!strncmp (op, "-v3", 3) || !strncmp (op, "-v2", 3))
# 1138| {
Error: CLANG_WARNING: [#def11]
libgpg-error-1.48-build/libgpg-error-1.48/src/argparse.c:1161:14: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
# 1159|
# 1160| num1 = strtol (str1, NULL, 0);
# 1161|-> num2 = strtol (str2, NULL, 0);
# 1162|
# 1163| if (!strcmp (op, "=="))
Error: CLANG_WARNING: [#def12]
libgpg-error-1.48-build/libgpg-error-1.48/src/argparse.c:1586:24: warning[core.NullDereference]: Access to field 'r_opt' results in a dereference of a null pointer (loaded from variable 'arg')
# 1584|
# 1585| if (initialize (arg, opts_orig, fp))
# 1586|-> return (arg->r_opt = ARGPARSE_OUT_OF_CORE);
# 1587|
# 1588| opts = arg->internal->opts;
Error: CLANG_WARNING: [#def13]
libgpg-error-1.48-build/libgpg-error-1.48/src/argparse.c:1588:10: warning[core.NullDereference]: Access to field 'internal' results in a dereference of a null pointer (loaded from variable 'arg')
# 1586| return (arg->r_opt = ARGPARSE_OUT_OF_CORE);
# 1587|
# 1588|-> opts = arg->internal->opts;
# 1589| nopts = arg->internal->nopts;
# 1590|
Error: CPPCHECK_WARNING (CWE-457): [#def14]
libgpg-error-1.48-build/libgpg-error-1.48/src/argparse.c:1626: error[legacyUninitvar]: Uninitialized variable: keyword
# 1624| for (idx=0; idx < nopts; idx++ )
# 1625| {
# 1626|-> if (opts[idx].long_opt && !strcmp (opts[idx].long_opt, keyword))
# 1627| break;
# 1628| }
Error: CLANG_WARNING: [#def15]
libgpg-error-1.48-build/libgpg-error-1.48/src/argparse.c:1763:19: warning[deadcode.DeadStores]: Value stored to 'set_ignore' is never read
# 1761| {
# 1762| prepare_arg_return (arg, opts, idx, 0, set_ignore);
# 1763|-> set_ignore = 0;
# 1764| goto leave;
# 1765| }
Error: GCC_ANALYZER_WARNING (CWE-457): [#def16]
libgpg-error-1.48-build/libgpg-error-1.48/src/argparse.c:39: included_from: Included from here.
libgpg-error-1.48-build/libgpg-error-1.48/src/argparse.c: scope_hint: In function '_gpgrt_argparse.part.0'
libgpg-error-1.48-build/libgpg-error-1.48/src/argparse.c:1772:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'keyword[0]'
libgpg-error-1.48-build/libgpg-error-1.48/src/gpgrt-int.h:579:5: note: in definition of macro 'gpgrt_assert'
libgpg-error-1.48-build/libgpg-error-1.48/src/gpgrt-int.h:579:5: note: in definition of macro 'gpgrt_assert'
libgpg-error-1.48-build/libgpg-error-1.48/src/gpgrt-int.h:579:5: note: in definition of macro 'gpgrt_assert'
# 1770| {
# 1771| /* We are at the end of a line. */
# 1772|-> gpgrt_assert (*keyword == '[');
# 1773| trim_spaces (keyword+1);
# 1774| if (!keyword[1])
Error: CLANG_WARNING: [#def17]
libgpg-error-1.48-build/libgpg-error-1.48/src/argparse.c:1821:15: warning[deadcode.DeadStores]: Value stored to 'set_ignore' is never read
# 1819| /* No argument found at the end of the line. */
# 1820| prepare_arg_return (arg, opts, idx, in_alias, set_ignore);
# 1821|-> set_ignore = 0;
# 1822| goto leave;
# 1823| }
Error: CLANG_WARNING: [#def18]
libgpg-error-1.48-build/libgpg-error-1.48/src/argparse.c:2217:24: warning[core.NullDereference]: Access to field 'r_opt' results in a dereference of a null pointer (loaded from variable 'arg')
# 2215| * warnings or errors from the last iteration. */
# 2216| if (initialize (arg, opts, NULL))
# 2217|-> return (arg->r_opt = ARGPARSE_OUT_OF_CORE);
# 2218|
# 2219| next_state:
Error: CLANG_WARNING: [#def19]
libgpg-error-1.48-build/libgpg-error-1.48/src/argparse.c:2220:11: warning[core.NullDereference]: Access to field 'internal' results in a dereference of a null pointer (loaded from variable 'arg')
# 2218|
# 2219| next_state:
# 2220|-> switch (arg->internal->state)
# 2221| {
# 2222| case STATE_init:
Error: CPPCHECK_WARNING: [#def20]
libgpg-error-1.48-build/libgpg-error-1.48/src/b64dec.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def21]
libgpg-error-1.48-build/libgpg-error-1.48/src/estream-printf.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def22]
libgpg-error-1.48-build/libgpg-error-1.48/src/estream.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def23]
libgpg-error-1.48-build/libgpg-error-1.48/src/estream.c:1747:22: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
# 1745| else
# 1746| bytes_read = 0;
# 1747|-> if (!bytes_read && ferror (file_cookie->fp))
# 1748| return -1;
# 1749| return bytes_read;
Error: CPPCHECK_WARNING: [#def24]
libgpg-error-1.48-build/libgpg-error-1.48/src/gen-posix-lock-obj.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def25]
libgpg-error-1.48-build/libgpg-error-1.48/src/gpg-error.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def26]
libgpg-error-1.48-build/libgpg-error-1.48/src/logging.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING (CWE-476): [#def27]
libgpg-error-1.48-build/libgpg-error-1.48/src/logging.c:260: error[nullPointer]: Null pointer dereference: (struct sockaddr_un*)0
# 258| srvr_addr_un.sun_path[sizeof (srvr_addr_un.sun_path)-1] = 0;
# 259| srvr_addr = (struct sockaddr *)&srvr_addr_un;
# 260|-> addrlen = SUN_LEN (&srvr_addr_un);
# 261| name_for_err = srvr_addr_un.sun_path;
# 262| }
Error: CPPCHECK_WARNING (CWE-476): [#def28]
libgpg-error-1.48-build/libgpg-error-1.48/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| }
# 274| }
Error: GCC_ANALYZER_WARNING (CWE-126): [#def29]
libgpg-error-1.48-build/libgpg-error-1.48/src/logging.c: scope_hint: In function 'set_file_fd'
libgpg-error-1.48-build/libgpg-error-1.48/src/logging.c:476:56: warning[-Wanalyzer-out-of-bounds]: buffer over-read
libgpg-error-1.48-build/libgpg-error-1.48/src/logging.c:476:56: note: read of 1 byte from after the end of '"-"'
libgpg-error-1.48-build/libgpg-error-1.48/src/logging.c:476:56: note: valid subscripts for '"-"' are '[0]' to '[1]'
# └─────────────────────────────┘
# ^
# 474| goto leave;
# 475| }
# 476|-> else if (name && !strncmp (name, "tcp://", 6) && name[6])
# 477| want_socket = 1;
# 478| #ifndef HAVE_W32_SYSTEM
Error: CPPCHECK_WARNING (CWE-664): [#def30]
libgpg-error-1.48-build/libgpg-error-1.48/src/logging.c:1230: error[va_list_usedBeforeStarted]: va_list 'dummy_argptr' used before va_start() was called.
# 1228| static va_list dummy_argptr;
# 1229|
# 1230|-> _gpgrt_logv_printhex (buffer, length, NULL, dummy_argptr);
# 1231| }
# 1232| }
Error: CPPCHECK_WARNING: [#def31]
libgpg-error-1.48-build/libgpg-error-1.48/src/mkheader.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def32]
libgpg-error-1.48-build/libgpg-error-1.48/src/spawn-posix.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-775): [#def33]
libgpg-error-1.48-build/libgpg-error-1.48/src/spawn-posix.c: scope_hint: In function 'do_exec'
libgpg-error-1.48-build/libgpg-error-1.48/src/spawn-posix.c:316:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'dup2(fds[i], i)'
# 314| if (nodevnull[i])
# 315| continue;
# 316|-> if (fds[i] != i && dup2 (fds[i], i) == -1)
# 317| _gpgrt_log_fatal ("dup2 std%s failed: %s\n",
# 318| i==0?"in":i==1?"out":"err", strerror (errno));
Error: GCC_ANALYZER_WARNING: [#def34]
libgpg-error-1.48-build/libgpg-error-1.48/src/spawn-posix.c:316:26: warning[-Wanalyzer-fd-use-without-check]: 'dup2' on possibly invalid file descriptor '-1'
# 314| if (nodevnull[i])
# 315| continue;
# 316|-> if (fds[i] != i && dup2 (fds[i], i) == -1)
# 317| _gpgrt_log_fatal ("dup2 std%s failed: %s\n",
# 318| i==0?"in":i==1?"out":"err", strerror (errno));
Error: CPPCHECK_WARNING: [#def35]
libgpg-error-1.48-build/libgpg-error-1.48/src/stringutils.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def36]
libgpg-error-1.48-build/libgpg-error-1.48/src/sysutils.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def37]
libgpg-error-1.48-build/libgpg-error-1.48/src/version.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def38]
libgpg-error-1.48-build/libgpg-error-1.48/tests/t-argparse.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def39]
libgpg-error-1.48-build/libgpg-error-1.48/tests/t-b64.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def40]
libgpg-error-1.48-build/libgpg-error-1.48/tests/t-lock.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def41]
libgpg-error-1.48-build/libgpg-error-1.48/tests/t-malloc.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def42]
libgpg-error-1.48-build/libgpg-error-1.48/tests/t-poll.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def43]
libgpg-error-1.48-build/libgpg-error-1.48/tests/t-stringutils.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Scan Properties
| analyzer-version-clang | 18.1.7 |
| analyzer-version-cppcheck | 2.14.2 |
| analyzer-version-gcc | 14.1.1 |
| analyzer-version-gcc-analyzer | 14.1.1 |
| analyzer-version-shellcheck | 0.10.0 |
| enabled-plugins | clang, cppcheck, gcc, shellcheck |
| exit-code | 0 |
| host | ip-172-16-1-231.us-west-2.compute.internal |
| mock-config | fedora-41-x86_64 |
| project-name | libgpg-error-1.48-1.fc40 |
| store-results-to | /tmp/tmptn_k6l4f/libgpg-error-1.48-1.fc40.tar.xz |
| time-created | 2024-07-03 14:40:38 |
| time-finished | 2024-07-03 14:42:33 |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmptn_k6l4f/libgpg-error-1.48-1.fc40.tar.xz' '--gcc-analyze' '/tmp/tmptn_k6l4f/libgpg-error-1.48-1.fc40.src.rpm' |
| tool-version | csmock-3.5.3-1.el9 |