coreutils-9.5-2.fc41

List of Defects

Error: CPPCHECK_WARNING: [#def1]
coreutils-9.5-build/coreutils-9.5/gnulib-tests/c-strcasestr.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def2]
coreutils-9.5-build/coreutils-9.5/gnulib-tests/localename.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def3]
coreutils-9.5-build/coreutils-9.5/gnulib-tests/strerror_r.c:165:7: warning[deadcode.DeadStores]: Value stored to 'ret' is never read
#  163|   
#  164|       {
#  165|->       ret = 0;
#  166|   
#  167|   # if HAVE___XPG_STRERROR_R

Error: CPPCHECK_WARNING: [#def4]
coreutils-9.5-build/coreutils-9.5/lib/areadlink-with-size.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def5]
coreutils-9.5-build/coreutils-9.5/lib/areadlinkat-with-size.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def6]
coreutils-9.5-build/coreutils-9.5/lib/argmatch.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
coreutils-9.5-build/coreutils-9.5/src/cp.c:26: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/src/cp.c: scope_hint: In function 'decode_preserve_arg'
coreutils-9.5-build/coreutils-9.5/lib/argmatch.h:108:15: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(arg)'
coreutils-9.5-build/coreutils-9.5/src/cp.c:922:13: note: in expansion of macro 'XARGMATCH'
coreutils-9.5-build/coreutils-9.5/src/cp.c:922:13: note: in expansion of macro 'XARGMATCH'
coreutils-9.5-build/coreutils-9.5/src/cp.c:922:13: note: in expansion of macro 'XARGMATCH'
coreutils-9.5-build/coreutils-9.5/src/cp.c:922:13: note: in expansion of macro 'XARGMATCH'
coreutils-9.5-build/coreutils-9.5/src/cp.c:922:13: note: in expansion of macro 'XARGMATCH'
#  106|   
#  107|   # define XARGMATCH(Context, Arg, Arglist, Vallist)              \
#  108|->   ((Vallist) [__xargmatch_internal (Context, Arg, Arglist,      \
#  109|                                       (void const *) (Vallist),   \
#  110|                                       sizeof *(Vallist),          \

Error: CPPCHECK_WARNING: [#def8]
coreutils-9.5-build/coreutils-9.5/lib/backupfile.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def9]
coreutils-9.5-build/coreutils-9.5/lib/base32.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def10]
coreutils-9.5-build/coreutils-9.5/lib/base64.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def11]
coreutils-9.5-build/coreutils-9.5/lib/c-strtod.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def12]
coreutils-9.5-build/coreutils-9.5/lib/c-strtold.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def13]
coreutils-9.5-build/coreutils-9.5/lib/canon-host.c: scope_hint: In function 'canon_host_r'
coreutils-9.5-build/coreutils-9.5/lib/canon-host.c:75:27: warning[-Wanalyzer-malloc-leak]: leak of 'canon_host_r(host, & last_cherror)'
#   73|            says Darwin 7.9.0 getaddrinfo returns 0 but sets
#   74|            res->ai_canonname to NULL.  */
#   75|->       retval = strdup (res->ai_canonname ? res->ai_canonname : host);
#   76|         if (!retval && cherror)
#   77|           *cherror = EAI_MEMORY;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
coreutils-9.5-build/coreutils-9.5/lib/canon-host.c:83:10: warning[-Wanalyzer-malloc-leak]: leak of 'canon_host_r(host, & last_cherror)'
#   81|       *cherror = status;
#   82|   
#   83|->   return retval;
#   84|   }
#   85|   

Error: CPPCHECK_WARNING: [#def15]
coreutils-9.5-build/coreutils-9.5/lib/canonicalize.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def16]
coreutils-9.5-build/coreutils-9.5/lib/canonicalize.c:387:15: warning[deadcode.DeadStores]: Value stored to 'name' is never read
#  385|                 /* Careful here, end may be a pointer into extra_buf... */
#  386|                 memmove (&extra_buf[n], end, len + 1);
#  387|->               name = end = memcpy (extra_buf, buf, n);
#  388|                 end_in_extra_buffer = true;
#  389|   

Error: CPPCHECK_WARNING: [#def17]
coreutils-9.5-build/coreutils-9.5/lib/careadlinkat.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-562): [#def18]
coreutils-9.5-build/coreutils-9.5/lib/careadlinkat.c: scope_hint: In function 'careadlinkat.constprop'
coreutils-9.5-build/coreutils-9.5/lib/careadlinkat.c:180:10: warning[-Wreturn-local-addr]: function may return address of local variable
#  180 |   return readlink_stk (fd, filename, buffer, buffer_size, alloc,
#      |          ^
coreutils-9.5-build/coreutils-9.5/lib/careadlinkat.c:179:8: note: declared here
#  179 |   char stack_buf[STACK_BUF_SIZE];
#      |        ^
#  178|     #endif
#  179|     char stack_buf[STACK_BUF_SIZE];
#  180|->   return readlink_stk (fd, filename, buffer, buffer_size, alloc,
#  181|                          preadlinkat, stack_buf);
#  182|   }

Error: CPPCHECK_WARNING: [#def19]
coreutils-9.5-build/coreutils-9.5/lib/exclude.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
coreutils-9.5-build/coreutils-9.5/lib/exclude.c: scope_hint: In function 'add_exclude'
coreutils-9.5-build/coreutils-9.5/lib/exclude.c:579:20: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(pattern)'
#  577|   
#  578|         char *str = xstrdup (pattern);
#  579|->       if ((options & (EXCLUDE_WILDCARDS | FNM_NOESCAPE)) == EXCLUDE_WILDCARDS)
#  580|           unescape_pattern (str);
#  581|         if (hash_insert (ex->head->v.table, str) != str)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def21]
coreutils-9.5-build/coreutils-9.5/lib/exclude.c: scope_hint: In function 'add_exclude_fp'
coreutils-9.5-build/coreutils-9.5/lib/exclude.c:604:24: warning[-Wanalyzer-null-dereference]: dereference of NULL 'buf'
coreutils-9.5-build/coreutils-9.5/lib/exclude.c:30: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/lib/exclude.c:47: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/lib/exclude.c:600:20: note: in expansion of macro 'getc'
coreutils-9.5-build/coreutils-9.5/lib/exclude.c: scope_hint: In function 'add_exclude_fp'
#  602|         if (buf_count == buf_alloc)
#  603|           buf = xpalloc (buf, &buf_alloc, 1, -1, 1);
#  604|->       buf[buf_count++] = c;
#  605|       }
#  606|   

Error: CPPCHECK_WARNING: [#def22]
coreutils-9.5-build/coreutils-9.5/lib/file-has-acl.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def23]
coreutils-9.5-build/coreutils-9.5/lib/file-set.c: scope_hint: In function 'record_file'
coreutils-9.5-build/coreutils-9.5/lib/file-set.c:43:8: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(24)'
#   41|     {
#   42|       struct F_triple *ent_from_table = hash_insert (ht, ent);
#   43|->     if (ent_from_table == NULL)
#   44|         {
#   45|           /* Insertion failed due to lack of memory.  */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
coreutils-9.5-build/coreutils-9.5/lib/file-set.c:49:8: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(24)'
#   47|         }
#   48|   
#   49|->     if (ent_from_table != ent)
#   50|         {
#   51|           /* There was already a matching entry in the table, so ENT was

Error: CPPCHECK_WARNING: [#def25]
coreutils-9.5-build/coreutils-9.5/lib/filevercmp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def26]
coreutils-9.5-build/coreutils-9.5/lib/fprintftime.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def27]
coreutils-9.5-build/coreutils-9.5/lib/freopen-safer.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
coreutils-9.5-build/coreutils-9.5/lib/fts.c:225: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/lib/fts-cycle.c: scope_hint: In function 'enter_dir'
coreutils-9.5-build/coreutils-9.5/lib/fts-cycle.c:94:10: warning[-Wanalyzer-malloc-leak]: leak of 'ad'
coreutils-9.5-build/coreutils-9.5/lib/fts.c:1245:22: note: in expansion of macro 'ISSET'
coreutils-9.5-build/coreutils-9.5/lib/fts.c:1307:34: note: in expansion of macro 'fts_opendir'
coreutils-9.5-build/coreutils-9.5/lib/fts.c:1330:19: note: in expansion of macro 'LEAVE_DIR'
coreutils-9.5-build/coreutils-9.5/lib/fts.c:1330:19: note: in expansion of macro 'LEAVE_DIR'
coreutils-9.5-build/coreutils-9.5/lib/fts.c:1330:19: note: in expansion of macro 'LEAVE_DIR'
#   92|         ad_from_table = hash_insert (fts->fts_cycle.ht, ad);
#   93|   
#   94|->       if (ad_from_table != ad)
#   95|           {
#   96|             free (ad);

Error: CPPCHECK_WARNING: [#def29]
coreutils-9.5-build/coreutils-9.5/lib/fts.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
coreutils-9.5-build/coreutils-9.5/lib/fts.c: scope_hint: In function 'filesystem_type'
coreutils-9.5-build/coreutils-9.5/lib/fts.c:714:12: warning[-Wanalyzer-malloc-leak]: leak of 't2'
coreutils-9.5-build/coreutils-9.5/lib/fts.c:743:13: note: in expansion of macro 'fts_assert'
coreutils-9.5-build/coreutils-9.5/lib/fts.c:743:13: note: in expansion of macro 'fts_assert'
#  712|        since the caller is not serious about performance.  */
#  713|     if (!ISSET (FTS_CWDFD))
#  714|->     return 0;
#  715|   
#  716|     if (! h)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
coreutils-9.5-build/coreutils-9.5/lib/fts.c: scope_hint: In function 'fts_build'
coreutils-9.5-build/coreutils-9.5/lib/fts.c:1307:16: warning[-Wanalyzer-malloc-leak]: leak of '**sp.fts_cur.fts_dirp'
coreutils-9.5-build/coreutils-9.5/lib/fts.c:1245:22: note: in expansion of macro 'ISSET'
coreutils-9.5-build/coreutils-9.5/lib/fts.c:1307:34: note: in expansion of macro 'fts_opendir'
coreutils-9.5-build/coreutils-9.5/lib/fts.c:1307:34: note: in expansion of macro 'fts_opendir'
# 1305|               /* Open the directory for reading.  If this fails, we're done.
# 1306|                  If being called from fts_read, set the fts_info field. */
# 1307|->             if ((cur->fts_dirp = fts_opendir(cur->fts_accpath, &dir_fd)) == NULL)
# 1308|                 {
# 1309|                   if (type == BREAD)

Error: CPPCHECK_WARNING: [#def32]
coreutils-9.5-build/coreutils-9.5/lib/getugroups.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def33]
coreutils-9.5-build/coreutils-9.5/lib/hash.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def34]
coreutils-9.5-build/coreutils-9.5/lib/human.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def35]
coreutils-9.5-build/coreutils-9.5/lib/human.c:177:15: warning[deadcode.DeadStores]: Value stored to 'grouping' during its initialization is never read
#  175|     char const *decimal_point = ".";
#  176|     size_t decimal_pointlen = 1;
#  177|->   char const *grouping = "";
#  178|     char const *thousands_sep = "";
#  179|     struct lconv const *l = localeconv ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def36]
coreutils-9.5-build/coreutils-9.5/lib/ialloc.h:60:37: warning[-Wanalyzer-malloc-leak]: leak of 'ximalloc(s + 1)'
coreutils-9.5-build/coreutils-9.5/lib/xmalloc.c: scope_hint: In function 'ximalloc'
coreutils-9.5-build/coreutils-9.5/lib/xmalloc.c: scope_hint: In function 'ximalloc'
#   58|   imalloc (idx_t s)
#   59|   {
#   60|->   return s <= SIZE_MAX ? malloc (s) : _gl_alloc_nomem ();
#   61|   }
#   62|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def37]
coreutils-9.5-build/coreutils-9.5/lib/ialloc.h:60:37: warning[-Wanalyzer-malloc-leak]: leak of 'ximalloc(s)'
coreutils-9.5-build/coreutils-9.5/lib/xmalloc.c: scope_hint: In function 'ximalloc'
coreutils-9.5-build/coreutils-9.5/lib/xmalloc.c: scope_hint: In function 'ximalloc'
#   58|   imalloc (idx_t s)
#   59|   {
#   60|->   return s <= SIZE_MAX ? malloc (s) : _gl_alloc_nomem ();
#   61|   }
#   62|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def38]
coreutils-9.5-build/coreutils-9.5/lib/ialloc.h:106:10: warning[-Wanalyzer-malloc-leak]: leak of 'xicalloc(s, 1)'
coreutils-9.5-build/coreutils-9.5/lib/xmalloc.c: scope_hint: In function 'xicalloc'
coreutils-9.5-build/coreutils-9.5/lib/xmalloc.c: scope_hint: In function 'xicalloc'
#  104|         s = 0;
#  105|       }
#  106|->   return calloc (n, s);
#  107|   }
#  108|   

Error: CPPCHECK_WARNING (CWE-664): [#def39]
coreutils-9.5-build/coreutils-9.5/lib/long-options.c:76: error[va_end_missing]: va_list 'authors' was opened but not closed by va_end().
#   74|               version_etc_va (stdout, command_name, package, version, authors);
#   75|               exit (EXIT_SUCCESS);
#   76|->           }
#   77|   
#   78|           default:

Error: CPPCHECK_WARNING (CWE-664): [#def40]
coreutils-9.5-build/coreutils-9.5/lib/long-options.c:129: error[va_end_missing]: va_list 'authors' was opened but not closed by va_end().
#  127|               version_etc_va (stdout, command_name, package, version, authors);
#  128|               exit (EXIT_SUCCESS);
#  129|->           }
#  130|   
#  131|           default:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def41]
coreutils-9.5-build/coreutils-9.5/src/unexpand.c:43: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/lib/mbfile.h: scope_hint: In function 'unexpand'
coreutils-9.5-build/coreutils-9.5/lib/mbfile.h:85:10: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(max_column_width * 32)'
coreutils-9.5-build/coreutils-9.5/src/unexpand.c:126:3: note: in expansion of macro 'mbf_init'
coreutils-9.5-build/coreutils-9.5/src/unexpand.c:186:13: note: in expansion of macro 'mbf_getc'
coreutils-9.5-build/coreutils-9.5/src/unexpand.c:186:13: note: in expansion of macro 'mbf_getc'
coreutils-9.5-build/coreutils-9.5/src/unexpand.c:189:17: note: in expansion of macro 'mbf_init'
#   83|     /* If EOF has already been seen, don't use getc.  This matters if
#   84|        mbf->fp is connected to an interactive tty.  */
#   85|->   if (mbf->eof_seen)
#   86|       goto eof;
#   87|   

Error: CPPCHECK_WARNING: [#def42]
coreutils-9.5-build/coreutils-9.5/lib/mbsrtoc32s.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def43]
coreutils-9.5-build/coreutils-9.5/lib/mbsrtowcs.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def44]
coreutils-9.5-build/coreutils-9.5/lib/memchr2.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def45]
coreutils-9.5-build/coreutils-9.5/lib/mini-gmp-gnulib.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-758): [#def46]
coreutils-9.5-build/coreutils-9.5/lib/mini-gmp.c:1513: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour
# 1511|   	{
# 1512|   	  int LOCAL_GMP_LIMB_BITS = GMP_LIMB_BITS;
# 1513|-> 	  while (x >>= LOCAL_GMP_LIMB_BITS)
# 1514|   	    {
# 1515|   	      ++ r->_mp_size;

Error: CPPCHECK_WARNING (CWE-758): [#def47]
coreutils-9.5-build/coreutils-9.5/lib/mini-gmp.c:1635: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour
# 1633|         n = GMP_MIN (n, 1 + (mp_size_t) (GMP_ULONG_BITS - 1) / GMP_LIMB_BITS);
# 1634|         while (--n >= 0)
# 1635|-> 	r = (r << LOCAL_GMP_LIMB_BITS) + u->_mp_d[n];
# 1636|         return r;
# 1637|       }

Error: CPPCHECK_WARNING: [#def48]
coreutils-9.5-build/coreutils-9.5/lib/mkancesdirs.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def49]
coreutils-9.5-build/coreutils-9.5/lib/mkdir-p.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def50]
coreutils-9.5-build/coreutils-9.5/lib/mktime.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-562): [#def51]
coreutils-9.5-build/coreutils-9.5/lib/mktime.c:262: error[returnDanglingLifetime]: Returning pointer to local variable 'x' that will be invalid when returning.
#  260|   {
#  261|     __time64_t x = t;
#  262|->   return convert (&x, tm);
#  263|   }
#  264|   

Error: CPPCHECK_WARNING: [#def52]
coreutils-9.5-build/coreutils-9.5/lib/mpsort.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def53]
coreutils-9.5-build/coreutils-9.5/lib/nproc.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def54]
coreutils-9.5-build/coreutils-9.5/lib/nstrftime.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def55]
coreutils-9.5-build/coreutils-9.5/lib/obstack.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def56]
coreutils-9.5-build/coreutils-9.5/lib/parse-datetime.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def57]
coreutils-9.5-build/coreutils-9.5/lib/posixtm.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def58]
coreutils-9.5-build/coreutils-9.5/lib/printf-parse.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def59]
coreutils-9.5-build/coreutils-9.5/lib/quotearg.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def60]
coreutils-9.5-build/coreutils-9.5/lib/randint.c: scope_hint: In function 'randint_new'
coreutils-9.5-build/coreutils-9.5/lib/randint.c:76:10: warning[-Wanalyzer-malloc-leak]: leak of 'randint_new(randread_new(name,  bytes_bound))'
#   74|     s->source = source;
#   75|     s->randnum = s->randmax = 0;
#   76|->   return s;
#   77|   }
#   78|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def61]
coreutils-9.5-build/coreutils-9.5/lib/randperm.c:146:1: warning[-Wanalyzer-malloc-leak]: leak of 'v1'
#  144|   
#  145|     v[i] = v1->val;
#  146|-> }
#  147|   
#  148|   static void

Error: GCC_ANALYZER_WARNING (CWE-401): [#def62]
coreutils-9.5-build/coreutils-9.5/lib/randperm.c: scope_hint: In function 'sparse_swap'
coreutils-9.5-build/coreutils-9.5/lib/randperm.c:146:1: warning[-Wanalyzer-malloc-leak]: leak of 'v2'
#  144|   
#  145|     v[i] = v1->val;
#  146|-> }
#  147|   
#  148|   static void

Error: CPPCHECK_WARNING: [#def63]
coreutils-9.5-build/coreutils-9.5/lib/randread.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def64]
coreutils-9.5-build/coreutils-9.5/lib/read-file.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def65]
coreutils-9.5-build/coreutils-9.5/separate/lib/sys/stat.h:54: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/lib/read-file.c:23: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/lib/read-file.c: scope_hint: In function 'fread_file'
coreutils-9.5-build/coreutils-9.5/lib/read-file.c:62:57: warning[-Wanalyzer-malloc-leak]: leak of 'fread_file(rpl_fopen(filename,  <unknown>), flags,  length)'
#   60|       struct stat st;
#   61|   
#   62|->     if (fstat (fileno (stream), &st) >= 0 && S_ISREG (st.st_mode))
#   63|         {
#   64|           off_t pos = ftello (stream);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def66]
coreutils-9.5-build/coreutils-9.5/lib/read-file.c:82:6: warning[-Wanalyzer-malloc-leak]: leak of 'fread_file(rpl_fopen(filename,  <unknown>), flags,  length)'
#   80|     }
#   81|   
#   82|->   if (!(buf = malloc (alloc)))
#   83|       return NULL; /* errno is ENOMEM.  */
#   84|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def67]
coreutils-9.5-build/coreutils-9.5/lib/read-file.c:104:30: warning[-Wanalyzer-malloc-leak]: leak of 'fread_file(rpl_fopen(filename,  <unknown>), flags,  length)'
#  102|   
#  103|               /* Shrink the allocated memory if possible.  */
#  104|->             if (size < alloc - 1)
#  105|                 {
#  106|                   if (flags & RF_SENSITIVE)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def68]
coreutils-9.5-build/coreutils-9.5/lib/read-file.c:142:43: warning[-Wanalyzer-malloc-leak]: leak of 'fread_file(rpl_fopen(filename,  <unknown>), flags,  length)'
coreutils-9.5-build/coreutils-9.5/lib/read-file.c: scope_hint: In function 'fread_file'
coreutils-9.5-build/coreutils-9.5/lib/read-file.c: scope_hint: In function 'fread_file'
coreutils-9.5-build/coreutils-9.5/lib/read-file.c:38: included_from: Included from here.
#  140|               }
#  141|   
#  142|->           if (alloc < PTRDIFF_MAX - alloc / 2)
#  143|               alloc = alloc + alloc / 2;
#  144|             else

Error: CPPCHECK_WARNING: [#def69]
coreutils-9.5-build/coreutils-9.5/lib/readtokens.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def70]
coreutils-9.5-build/coreutils-9.5/lib/readtokens0.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def71]
coreutils-9.5-build/coreutils-9.5/lib/readutmp.c:249:8: warning[core.NullDereference]: Dereference of null pointer
#  247|     char *stringlim = (char *) a.utmp + a.alloc_bytes;
#  248|     char *p = stringlim - a.string_bytes;
#  249|->   *--p = '\0'; /* NUL-terminate ut->ut_user */
#  250|     ut->ut_user = p = memcpy (p - user_len, user, user_len);
#  251|     *--p = '\0'; /* NUL-terminate ut->ut_id */

Error: CPPCHECK_WARNING: [#def72]
coreutils-9.5-build/coreutils-9.5/lib/renameatu.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def73]
coreutils-9.5-build/coreutils-9.5/lib/set-permissions.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def74]
coreutils-9.5-build/coreutils-9.5/lib/sm3-stream.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def75]
coreutils-9.5-build/coreutils-9.5/lib/sm3.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def76]
coreutils-9.5-build/coreutils-9.5/src/tsort.c:32: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/src/tsort.c: scope_hint: In function 'tsort'
coreutils-9.5-build/coreutils-9.5/lib/stdio--.h:30:18: warning[-Wanalyzer-malloc-leak]: leak of 'xzalloc(56)'
coreutils-9.5-build/coreutils-9.5/src/tsort.c:440:22: note: in expansion of macro 'freopen'
coreutils-9.5-build/coreutils-9.5/src/tsort.c: scope_hint: In function 'tsort'
coreutils-9.5-build/coreutils-9.5/src/tsort.c:440:22: note: in expansion of macro 'freopen'
coreutils-9.5-build/coreutils-9.5/src/tsort.c:440:22: note: in expansion of macro 'freopen'
#   28|   #if GNULIB_FREOPEN_SAFER
#   29|   # undef freopen
#   30|-> # define freopen freopen_safer
#   31|   #endif
#   32|   

Error: CPPCHECK_WARNING: [#def77]
coreutils-9.5-build/coreutils-9.5/lib/strintcmp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def78]
coreutils-9.5-build/coreutils-9.5/lib/strnumcmp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def79]
coreutils-9.5-build/coreutils-9.5/lib/tempname.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def80]
coreutils-9.5-build/coreutils-9.5/lib/time_rz.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def81]
coreutils-9.5-build/coreutils-9.5/lib/time_rz.c: scope_hint: In function 'tzfree'
coreutils-9.5-build/coreutils-9.5/lib/time_rz.c:68:64: warning[-Wanalyzer-malloc-leak]: leak of 'tzalloc(getenv("TZ"))'
coreutils-9.5-build/coreutils-9.5/lib/time_rz.c:27: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/lib/time_rz.c:29: included_from: Included from here.
#   66|   {
#   67|     size_t name_size = name ? strlen (name) + 1 : 0;
#   68|->   size_t abbr_size = name_size < ABBR_SIZE_MIN ? ABBR_SIZE_MIN : name_size + 1;
#   69|     timezone_t tz = malloc (FLEXSIZEOF (struct tm_zone, abbrs, abbr_size));
#   70|     if (tz)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def82]
coreutils-9.5-build/coreutils-9.5/lib/time_rz.c: scope_hint: In function 'mktime_z'
coreutils-9.5-build/coreutils-9.5/lib/time_rz.c:211:12: warning[-Wanalyzer-malloc-leak]: leak of 'set_tz(tz)'
#  209|     if (env_tz
#  210|         ? tz->tz_is_set && strcmp (tz->abbrs, env_tz) == 0
#  211|->       : !tz->tz_is_set)
#  212|       return local_tz;
#  213|     else

Error: CLANG_WARNING: [#def83]
coreutils-9.5-build/coreutils-9.5/lib/time_rz.c:222:11: warning[unix.Malloc]: Potential leak of memory pointed to by 'old_tz'
#  220|             int saved_errno = errno;
#  221|             tzfree (old_tz);
#  222|->           errno = saved_errno;
#  223|             return NULL;
#  224|           }

Error: CLANG_WARNING: [#def84]
coreutils-9.5-build/coreutils-9.5/lib/time_rz.c:276:37: warning[unix.Malloc]: Potential leak of memory pointed to by 'old_tz'
#  274|           {
#  275|             bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm);
#  276|->           if (revert_tz (old_tz) && abbr_saved)
#  277|               return tm;
#  278|           }

Error: CLANG_WARNING: [#def85]
coreutils-9.5-build/coreutils-9.5/lib/time_rz.c:308:37: warning[unix.Malloc]: Potential leak of memory pointed to by 'old_tz'
#  306|             ok = ok && save_abbr (tz, &tm_1);
#  307|   #endif
#  308|->           if (revert_tz (old_tz) && ok)
#  309|               {
#  310|                 *tm = tm_1;

Error: CPPCHECK_WARNING: [#def86]
coreutils-9.5-build/coreutils-9.5/lib/tmpdir.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def87]
coreutils-9.5-build/coreutils-9.5/lib/unistr/u8-mbtoucr.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def88]
coreutils-9.5-build/coreutils-9.5/lib/userspec.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def89]
coreutils-9.5-build/coreutils-9.5/lib/utimecmp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def90]
coreutils-9.5-build/coreutils-9.5/lib/utimens.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def91]
coreutils-9.5-build/coreutils-9.5/lib/vasnprintf.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def92]
coreutils-9.5-build/coreutils-9.5/lib/xmalloc.c: scope_hint: In function 'xmalloc'
coreutils-9.5-build/coreutils-9.5/lib/xmalloc.c:45:10: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(n)'
coreutils-9.5-build/coreutils-9.5/lib/xmalloc.c:22: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/lib/xmalloc.c:57:10: note: in expansion of macro 'XNMALLOC'
coreutils-9.5-build/coreutils-9.5/lib/xmalloc.c:57:10: note: in expansion of macro 'XNMALLOC'
coreutils-9.5-build/coreutils-9.5/lib/xmalloc.c: scope_hint: In function 'xmalloc'
#   43|   xmalloc (size_t s)
#   44|   {
#   45|->   return check_nonnull (malloc (s));
#   46|   }
#   47|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def93]
coreutils-9.5-build/coreutils-9.5/lib/xmalloc.c:45:10: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(s)'
coreutils-9.5-build/coreutils-9.5/lib/xmalloc.c: scope_hint: In function 'xmalloc'
#   43|   xmalloc (size_t s)
#   44|   {
#   45|->   return check_nonnull (malloc (s));
#   46|   }
#   47|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def94]
coreutils-9.5-build/coreutils-9.5/lib/xmalloc.c: scope_hint: In function 'xcalloc'
coreutils-9.5-build/coreutils-9.5/lib/xmalloc.c:298:10: warning[-Wanalyzer-malloc-leak]: leak of 'xcalloc(s, 1)'
coreutils-9.5-build/coreutils-9.5/lib/xmalloc.c: scope_hint: In function 'xcalloc'
#  296|   xcalloc (size_t n, size_t s)
#  297|   {
#  298|->   return check_nonnull (calloc (n, s));
#  299|   }
#  300|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def95]
coreutils-9.5-build/coreutils-9.5/lib/xmalloc.c: scope_hint: In function 'xmemdup'
coreutils-9.5-build/coreutils-9.5/lib/xmalloc.c:314:10: warning[-Wanalyzer-malloc-leak]: leak of 'xmemdup(string,  strlen(string) + 1)'
coreutils-9.5-build/coreutils-9.5/lib/xmalloc.c: scope_hint: In function 'xmemdup'
#  312|   xmemdup (void const *p, size_t s)
#  313|   {
#  314|->   return memcpy (xmalloc (s), p, s);
#  315|   }
#  316|   

Error: CPPCHECK_WARNING: [#def96]
coreutils-9.5-build/coreutils-9.5/lib/xstrtoimax.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def97]
coreutils-9.5-build/coreutils-9.5/lib/xstrtol.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def98]
coreutils-9.5-build/coreutils-9.5/lib/xstrtoul.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def99]
coreutils-9.5-build/coreutils-9.5/lib/xstrtoumax.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def100]
coreutils-9.5-build/coreutils-9.5/src/basenc.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def101]
coreutils-9.5-build/coreutils-9.5/src/basenc.c: scope_hint: In function 'do_decode'
coreutils-9.5-build/coreutils-9.5/src/basenc.c:239:22: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(4200)'
coreutils-9.5-build/coreutils-9.5/lib/unlocked-io.h:92:46: note: in definition of macro 'fread'
coreutils-9.5-build/coreutils-9.5/src/basenc.c:1158:31: note: in expansion of macro 'BASE_LENGTH'
coreutils-9.5-build/coreutils-9.5/lib/unlocked-io.h:92:46: note: in definition of macro 'fread'
coreutils-9.5-build/coreutils-9.5/src/basenc.c:1158:31: note: in expansion of macro 'BASE_LENGTH'
#  237|   
#  238|   
#  239|-> # define BASE_LENGTH base_length
#  240|   # define REQUIRED_PADDING required_padding
#  241|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def102]
coreutils-9.5-build/coreutils-9.5/src/system.h:254: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/src/basenc.c:25: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/src/basenc.c: scope_hint: In function 'do_encode'
coreutils-9.5-build/coreutils-9.5/src/basenc.c:1107:52: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc((long unsigned int)base_length(30720))'
coreutils-9.5-build/coreutils-9.5/lib/unlocked-io.h:92:46: note: in definition of macro 'fread'
coreutils-9.5-build/coreutils-9.5/src/basenc.c:1122:11: note: in expansion of macro 'feof'
coreutils-9.5-build/coreutils-9.5/src/basenc.c: scope_hint: In function 'do_encode'
coreutils-9.5-build/coreutils-9.5/lib/unlocked-io.h:92:46: note: in definition of macro 'fread'
# 1105|         do
# 1106|           {
# 1107|->           n = fread (inbuf + sum, 1, ENC_BLOCKSIZE - sum, in);
# 1108|             sum += n;
# 1109|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def103]
coreutils-9.5-build/coreutils-9.5/src/system.h:254: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/src/basenc.c:25: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/src/basenc.c: scope_hint: In function 'do_encode'
coreutils-9.5-build/coreutils-9.5/src/basenc.c:1107:52: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(40960)'
coreutils-9.5-build/coreutils-9.5/lib/unlocked-io.h:92:46: note: in definition of macro 'fread'
coreutils-9.5-build/coreutils-9.5/src/basenc.c:1122:11: note: in expansion of macro 'feof'
coreutils-9.5-build/coreutils-9.5/src/basenc.c: scope_hint: In function 'do_encode'
coreutils-9.5-build/coreutils-9.5/lib/unlocked-io.h:92:46: note: in definition of macro 'fread'
# 1105|         do
# 1106|           {
# 1107|->           n = fread (inbuf + sum, 1, ENC_BLOCKSIZE - sum, in);
# 1108|             sum += n;
# 1109|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def104]
coreutils-9.5-build/coreutils-9.5/src/system.h:254: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/src/basenc.c:25: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/src/basenc.c: scope_hint: In function 'do_encode'
coreutils-9.5-build/coreutils-9.5/src/basenc.c:1107:52: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(49152)'
coreutils-9.5-build/coreutils-9.5/lib/unlocked-io.h:92:46: note: in definition of macro 'fread'
coreutils-9.5-build/coreutils-9.5/src/basenc.c:1122:11: note: in expansion of macro 'feof'
coreutils-9.5-build/coreutils-9.5/src/basenc.c: scope_hint: In function 'do_encode'
coreutils-9.5-build/coreutils-9.5/lib/unlocked-io.h:92:46: note: in definition of macro 'fread'
# 1105|         do
# 1106|           {
# 1107|->           n = fread (inbuf + sum, 1, ENC_BLOCKSIZE - sum, in);
# 1108|             sum += n;
# 1109|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def105]
coreutils-9.5-build/coreutils-9.5/src/basenc.c: scope_hint: In function 'do_decode'
coreutils-9.5-build/coreutils-9.5/src/basenc.c:1158:59: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(3072)'
coreutils-9.5-build/coreutils-9.5/lib/unlocked-io.h:92:46: note: in definition of macro 'fread'
coreutils-9.5-build/coreutils-9.5/lib/unlocked-io.h:92:46: note: in definition of macro 'fread'
# 1156|           {
# 1157|             idx_t n = fread (inbuf + sum,
# 1158|->                            1, BASE_LENGTH (DEC_BLOCKSIZE) - sum, in);
# 1159|   
# 1160|             if (ignore_garbage)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def106]
coreutils-9.5-build/coreutils-9.5/src/basenc.c: scope_hint: In function 'do_decode'
coreutils-9.5-build/coreutils-9.5/src/basenc.c:1158:59: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(5120)'
coreutils-9.5-build/coreutils-9.5/lib/unlocked-io.h:92:46: note: in definition of macro 'fread'
coreutils-9.5-build/coreutils-9.5/lib/unlocked-io.h:92:46: note: in definition of macro 'fread'
# 1156|           {
# 1157|             idx_t n = fread (inbuf + sum,
# 1158|->                            1, BASE_LENGTH (DEC_BLOCKSIZE) - sum, in);
# 1159|   
# 1160|             if (ignore_garbage)

Error: CPPCHECK_WARNING: [#def107]
coreutils-9.5-build/coreutils-9.5/src/blake2/b2sum.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def108]
coreutils-9.5-build/coreutils-9.5/src/blake2/blake2b-ref.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def109]
coreutils-9.5-build/coreutils-9.5/src/cat.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def110]
coreutils-9.5-build/coreutils-9.5/src/chcon.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def111]
coreutils-9.5-build/coreutils-9.5/src/chmod.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def112]
coreutils-9.5-build/coreutils-9.5/src/chown-core.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def113]
coreutils-9.5-build/coreutils-9.5/src/chown-core.c: scope_hint: In function 'uid_to_name'
coreutils-9.5-build/coreutils-9.5/src/chown-core.c:84:19: warning[-Wanalyzer-malloc-leak]: leak of 'uid_to_name(*file_stats.st_uid)'
#   82|     char buf[INT_BUFSIZE_BOUND (intmax_t)];
#   83|     return xstrdup (TYPE_SIGNED (uid_t) ? imaxtostr (uid, buf)
#   84|->                   : umaxtostr (uid, buf));
#   85|   }
#   86|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def114]
coreutils-9.5-build/coreutils-9.5/src/chown-core.c: scope_hint: In function 'gid_to_name'
coreutils-9.5-build/coreutils-9.5/src/chown-core.c:95:19: warning[-Wanalyzer-malloc-leak]: leak of 'gid_to_name(*file_stats.st_gid)'
#   93|     char buf[INT_BUFSIZE_BOUND (intmax_t)];
#   94|     return xstrdup (TYPE_SIGNED (gid_t) ? imaxtostr (gid, buf)
#   95|->                   : umaxtostr (gid, buf));
#   96|   }
#   97|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def115]
coreutils-9.5-build/coreutils-9.5/src/chown-core.c:106:28: warning[-Wanalyzer-malloc-leak]: leak of 'gid_to_name(*file_stats.st_gid)'
#  104|   {
#  105|     struct group *grp = getgrgid (gid);
#  106|->   return grp ? xstrdup (grp->gr_name) : gid_to_str (gid);
#  107|   }
#  108|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def116]
coreutils-9.5-build/coreutils-9.5/src/chown-core.c: scope_hint: In function 'uid_to_name'
coreutils-9.5-build/coreutils-9.5/src/chown-core.c:117:28: warning[-Wanalyzer-malloc-leak]: leak of 'uid_to_name(*file_stats.st_uid)'
#  115|   {
#  116|     struct passwd *pwd = getpwuid (uid);
#  117|->   return pwd ? xstrdup (pwd->pw_name) : uid_to_str (uid);
#  118|   }
#  119|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def117]
coreutils-9.5-build/coreutils-9.5/src/chown-core.c: scope_hint: In function 'describe_change'
coreutils-9.5-build/coreutils-9.5/src/chown-core.c:171:3: warning[-Wanalyzer-malloc-leak]: leak of 'user_group_str(<unknown>,  <unknown>)'
#  169|                                group ? old_group : nullptr);
#  170|   
#  171|->   switch (changed)
#  172|       {
#  173|       case CH_SUCCEEDED:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def118]
coreutils-9.5-build/coreutils-9.5/src/chown-core.c:179:10: warning[-Wanalyzer-malloc-leak]: leak of 'user_group_str(<unknown>,  <unknown>)'
#  177|         break;
#  178|       case CH_FAILED:
#  179|->       if (old_spec)
#  180|           {
#  181|             fmt = (user ? _("failed to change ownership of %s from %s to %s\n")

Error: CPPCHECK_WARNING: [#def119]
coreutils-9.5-build/coreutils-9.5/src/chown.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def120]
coreutils-9.5-build/coreutils-9.5/src/chroot.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def121]
coreutils-9.5-build/coreutils-9.5/src/chroot.c: scope_hint: In function 'parse_additional_groups'
coreutils-9.5-build/coreutils-9.5/src/chroot.c:147:22: warning[-Wanalyzer-null-dereference]: dereference of NULL 'gids'
coreutils-9.5-build/coreutils-9.5/src/chroot.c:306:11: note: in expansion of macro 'uid_set'
coreutils-9.5-build/coreutils-9.5/src/chroot.c:28: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/lib/ignore-value.h:46:45: note: in definition of macro 'ignore_value'
coreutils-9.5-build/coreutils-9.5/lib/ignore-value.h:46:45: note: in definition of macro 'ignore_value'
#  145|         if (n_gids == n_gids_allocated)
#  146|           gids = X2NREALLOC (gids, &n_gids_allocated);
#  147|->       gids[n_gids++] = value;
#  148|       }
#  149|   

Error: CPPCHECK_WARNING: [#def122]
coreutils-9.5-build/coreutils-9.5/src/cksum.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def123]
coreutils-9.5-build/coreutils-9.5/src/cksum_pclmul.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def124]
coreutils-9.5-build/coreutils-9.5/src/comm.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def125]
coreutils-9.5-build/coreutils-9.5/src/copy.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def126]
coreutils-9.5-build/coreutils-9.5/src/coreutils.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def127]
coreutils-9.5-build/coreutils-9.5/src/cp-hash.c: scope_hint: In function 'remember_copied'
coreutils-9.5-build/coreutils-9.5/src/cp-hash.c:126:6: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(24)'
#  124|   
#  125|     ent_from_table = hash_insert (src_to_dest, ent);
#  126|->   if (ent_from_table == nullptr)
#  127|       {
#  128|         /* Insertion failed due to lack of memory.  */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def128]
coreutils-9.5-build/coreutils-9.5/src/cp-hash.c:135:6: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(24)'
#  133|        with a matching key.  If so, free ENT (it wasn't inserted) and
#  134|        return the 'name' from the table entry.  */
#  135|->   if (ent_from_table != ent)
#  136|       {
#  137|         src_to_dest_free (ent);

Error: CPPCHECK_WARNING: [#def129]
coreutils-9.5-build/coreutils-9.5/src/cp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def130]
coreutils-9.5-build/coreutils-9.5/src/cp.c:767:23: warning[core.CallAndMessage]: 5th function call argument is an uninitialized value
#  765|   
#  766|                 if (parents_option)
#  767|->                 ok &= re_protect (dst_name, arg_in_concat, target_dirfd,
#  768|                                     dst_relname, attr_list, x);
#  769|               }

Error: CPPCHECK_WARNING: [#def131]
coreutils-9.5-build/coreutils-9.5/src/csplit.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def132]
coreutils-9.5-build/coreutils-9.5/src/csplit.c: scope_hint: In function 'get_new_buffer'
coreutils-9.5-build/coreutils-9.5/src/csplit.c:418:10: warning[-Wanalyzer-malloc-leak]: leak of 'get_new_buffer(bytes_wanted)'
coreutils-9.5-build/coreutils-9.5/src/system.h:29: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/src/csplit.c:27: included_from: Included from here.
#  416|     new_buffer->next = nullptr;
#  417|   
#  418|->   return new_buffer;
#  419|   }
#  420|   

Error: CLANG_WARNING: [#def133]
coreutils-9.5-build/coreutils-9.5/src/csplit.c:576:21: warning[core.NullDereference]: Access to field 'start_line' results in a dereference of a null pointer (loaded from variable 'b')
#  574|     for (b = head;;)
#  575|       {
#  576|->       if (linenum < b->start_line + b->num_lines)
#  577|           {
#  578|             /* The line is in this buffer. */

Error: CLANG_WARNING: [#def134]
coreutils-9.5-build/coreutils-9.5/src/csplit.c:1367:22: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
# 1365|       }
# 1366|   
# 1367|->   idx_t prefix_len = strlen (prefix);
# 1368|     idx_t max_digit_string_len
# 1369|       = (suffix

Error: GCC_ANALYZER_WARNING (CWE-401): [#def135]
coreutils-9.5-build/coreutils-9.5/src/csplit.c: scope_hint: In function 'main'
coreutils-9.5-build/coreutils-9.5/src/csplit.c:1377:30: warning[-Wanalyzer-malloc-leak]: leak of 'ximalloc(__real__ <unknown>)'
# 1375|     filename_space = ximalloc (filename_size);
# 1376|   
# 1377|->   set_input_file (argv[optind++]);
# 1378|   
# 1379|     parse_patterns (argc, optind, argv);

Error: CPPCHECK_WARNING: [#def136]
coreutils-9.5-build/coreutils-9.5/src/cut.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def137]
coreutils-9.5-build/coreutils-9.5/src/date.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def138]
coreutils-9.5-build/coreutils-9.5/src/date.c: scope_hint: In function 'main'
coreutils-9.5-build/coreutils-9.5/src/date.c:316:32: warning[-Wanalyzer-malloc-leak]: leak of 'adjust_resolution(format)'
#  314|     char *copy = nullptr;
#  315|   
#  316|->   for (char const *f = format; *f; f++)
#  317|       if (f[0] == '%')
#  318|         {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def139]
coreutils-9.5-build/coreutils-9.5/src/date.c: scope_hint: In function 'batch_convert'
coreutils-9.5-build/coreutils-9.5/src/date.c:393:10: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
coreutils-9.5-build/coreutils-9.5/src/date.c:561:20: note: in expansion of macro 'DATE_FMT_LANGINFO'
coreutils-9.5-build/coreutils-9.5/src/date.c:20: included_from: Included from here.
#  391|     free (line);
#  392|   
#  393|->   return ok;
#  394|   }
#  395|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def140]
coreutils-9.5-build/coreutils-9.5/src/date.c: scope_hint: In function 'main'
coreutils-9.5-build/coreutils-9.5/src/date.c:632:10: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
#  630|           }
#  631|   
#  632|->       if (! valid_date)
#  633|           error (EXIT_FAILURE, 0, _("invalid date %s"), quote (datestr));
#  634|   

Error: CPPCHECK_WARNING: [#def141]
coreutils-9.5-build/coreutils-9.5/src/dd.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def142]
coreutils-9.5-build/coreutils-9.5/src/dd.c:2510:19: warning[deadcode.DeadStores]: Value stored to 'exit_status' is never read
# 2508|                   {
# 2509|                     diagnose (errno, _("cannot fstat %s"), quoteaf (output_file));
# 2510|->                   exit_status = EXIT_FAILURE;
# 2511|                   }
# 2512|                 else if (S_ISREG (stdout_stat.st_mode)

Error: CLANG_WARNING: [#def143]
coreutils-9.5-build/coreutils-9.5/src/dd.c:2521:19: warning[deadcode.DeadStores]: Value stored to 'exit_status' is never read
# 2519|                                 " in output file %s"),
# 2520|                               isize, quoteaf (output_file));
# 2521|->                   exit_status = EXIT_FAILURE;
# 2522|                   }
# 2523|               }

Error: CPPCHECK_WARNING: [#def144]
coreutils-9.5-build/coreutils-9.5/src/df.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def145]
coreutils-9.5-build/coreutils-9.5/src/df.c:1170:47: warning[core.NullDereference]: Access to field 'total' results in a dereference of a null pointer (loaded from variable 'v')
# 1168|           case SIZE_FIELD:
# 1169|           case ITOTAL_FIELD:
# 1170|->           cell = xstrdup (df_readable (false, v->total, buf,
# 1171|                                          v->input_units, v->output_units));
# 1172|             break;

Error: CLANG_WARNING: [#def146]
coreutils-9.5-build/coreutils-9.5/src/df.c:1176:40: warning[core.NullDereference]: Access to field 'negate_used' results in a dereference of a null pointer (loaded from variable 'v')
# 1174|           case USED_FIELD:
# 1175|           case IUSED_FIELD:
# 1176|->           cell = xstrdup (df_readable (v->negate_used, v->used, buf,
# 1177|                                          v->input_units, v->output_units));
# 1178|             break;

Error: CLANG_WARNING: [#def147]
coreutils-9.5-build/coreutils-9.5/src/df.c:1182:40: warning[core.NullDereference]: Access to field 'negate_available' results in a dereference of a null pointer (loaded from variable 'v')
# 1180|           case AVAIL_FIELD:
# 1181|           case IAVAIL_FIELD:
# 1182|->           cell = xstrdup (df_readable (v->negate_available, v->available, buf,
# 1183|                                          v->input_units, v->output_units));
# 1184|             break;

Error: CLANG_WARNING: [#def148]
coreutils-9.5-build/coreutils-9.5/src/df.c:1190:32: warning[core.NullDereference]: Access to field 'used' results in a dereference of a null pointer (loaded from variable 'v')
# 1188|             {
# 1189|               double pct = -1;
# 1190|->             if (! known_value (v->used) || ! known_value (v->available))
# 1191|                 ;
# 1192|               else if (!v->negate_used

Error: CPPCHECK_WARNING: [#def149]
coreutils-9.5-build/coreutils-9.5/src/digest.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-457): [#def150]
coreutils-9.5-build/coreutils-9.5/src/digest.c:1148: error[uninitvar]: Uninitialized variable: bin_buffer_unaligned
# 1146|     unsigned char bin_buffer_unaligned[DIGEST_BIN_BYTES + DIGEST_ALIGN];
# 1147|     /* Make sure bin_buffer is properly aligned. */
# 1148|->   unsigned char *bin_buffer = ptr_align (bin_buffer_unaligned, DIGEST_ALIGN);
# 1149|     uintmax_t line_number;
# 1150|     char *line;

Error: CPPCHECK_WARNING (CWE-457): [#def151]
coreutils-9.5-build/coreutils-9.5/src/digest.c:1348: error[uninitvar]: Uninitialized variable: bin_buffer_unaligned
# 1346|     unsigned char bin_buffer_unaligned[DIGEST_BIN_BYTES + DIGEST_ALIGN];
# 1347|     /* Make sure bin_buffer is properly aligned. */
# 1348|->   unsigned char *bin_buffer = ptr_align (bin_buffer_unaligned, DIGEST_ALIGN);
# 1349|     bool do_check = false;
# 1350|     int opt;

Error: CLANG_WARNING: [#def152]
coreutils-9.5-build/coreutils-9.5/src/digest.c:1624:15: warning[core.CallAndMessage]: 8th function call argument is an uninitialized value
# 1622|             else
# 1623|               {
# 1624|->               DIGEST_OUT (file, binary_file, bin_buffer, raw_digest, prefix_tag,
# 1625|                             digest_delim, optind != argc, length);
# 1626|               }

Error: CPPCHECK_WARNING: [#def153]
coreutils-9.5-build/coreutils-9.5/src/dircolors.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def154]
coreutils-9.5-build/coreutils-9.5/src/du.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def155]
coreutils-9.5-build/coreutils-9.5/src/env.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def156]
coreutils-9.5-build/coreutils-9.5/src/env.c: scope_hint: In function 'parse_signal_action_params.part.0'
coreutils-9.5-build/coreutils-9.5/src/env.c:567:10: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(arg)'
#  565|         if (signum == 0)
#  566|           error (0, 0, _("%s: invalid signal"), quote (opt_sig));
#  567|->       if (signum <= 0)
#  568|           usage (exit_failure);
#  569|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def157]
coreutils-9.5-build/coreutils-9.5/src/env.c:570:14: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(arg)'
#  568|           usage (exit_failure);
#  569|   
#  570|->       signals[signum] = set_default ? DEFAULT : IGNORE;
#  571|   
#  572|         opt_sig = strtok (nullptr, ",");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def158]
coreutils-9.5-build/coreutils-9.5/src/env.c: scope_hint: In function 'parse_block_signal_params.part.0'
coreutils-9.5-build/coreutils-9.5/src/env.c:656:10: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(arg)'
#  654|         if (signum == 0)
#  655|           error (0, 0, _("%s: invalid signal"), quote (opt_sig));
#  656|->       if (signum <= 0)
#  657|           usage (exit_failure);
#  658|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def159]
coreutils-9.5-build/coreutils-9.5/src/env.c:661:14: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(arg)'
#  659|         if (sigaddset (block ? &block_signals : &unblock_signals, signum) == -1)
#  660|           {
#  661|->           if (block)
#  662|               error (EXIT_CANCELED, errno,
#  663|                      _("failed to block signal %d"), signum);

Error: CLANG_WARNING: [#def160]
coreutils-9.5-build/coreutils-9.5/src/expand-common.c:455:11: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  453|         if (!ferror (fp))
#  454|           err = 0;
#  455|->       if (STREQ (prev_file, "-"))
#  456|           clearerr (fp);		/* Also clear EOF.  */
#  457|         else if (fclose (fp) != 0)

Error: CPPCHECK_WARNING: [#def161]
coreutils-9.5-build/coreutils-9.5/src/expand.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def162]
coreutils-9.5-build/coreutils-9.5/src/expr.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def163]
coreutils-9.5-build/coreutils-9.5/src/factor.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-758): [#def164]
coreutils-9.5-build/coreutils-9.5/src/factor.c:466: error[shiftTooManyBitsSigned]: Shifting signed 64-bit value by 63 bits is undefined behaviour
#  464|           return (a << 1) + 1;
#  465|   
#  466|->       bgta = HIGHBIT_TO_MASK (t);
#  467|   
#  468|         /* b <-- min (a, b) */

Error: CPPCHECK_WARNING (CWE-457): [#def165]
coreutils-9.5-build/coreutils-9.5/src/factor.c:1392: error[uninitvar]: Uninitialized variable: q
# 1390|       return true;
# 1391|   
# 1392|->   mpz_inits (q, a, nm1, tmp, nullptr);
# 1393|   
# 1394|     /* Precomputation for Miller-Rabin.  */

Error: CPPCHECK_WARNING (CWE-457): [#def166]
coreutils-9.5-build/coreutils-9.5/src/factor.c:1679: error[uninitvar]: Uninitialized variable: t
# 1677|     devmsg ("[pollard-rho (%lu)] ", a);
# 1678|   
# 1679|->   mpz_inits (t, t2, nullptr);
# 1680|     mpz_init_set_si (y, 2);
# 1681|     mpz_init_set_si (x, 2);

Error: CPPCHECK_WARNING: [#def167]
coreutils-9.5-build/coreutils-9.5/src/fmt.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def168]
coreutils-9.5-build/coreutils-9.5/src/fold.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def169]
coreutils-9.5-build/coreutils-9.5/src/groups.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def170]
coreutils-9.5-build/coreutils-9.5/src/head.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-476): [#def171]
coreutils-9.5-build/coreutils-9.5/src/head.c:382: warning[nullPointer]: Possible null pointer dereference: b
#  380|             if (! buffered_enough)
#  381|               {
#  382|->               b[i] = xmalloc (READ_BUFSIZE);
#  383|                 n_alloc = i + 1;
#  384|               }

Error: CPPCHECK_WARNING (CWE-476): [#def172]
coreutils-9.5-build/coreutils-9.5/src/head.c:385: warning[nullPointer]: Possible null pointer dereference: b
#  383|                 n_alloc = i + 1;
#  384|               }
#  385|->           n_read = full_read (fd, b[i], READ_BUFSIZE);
#  386|             if (n_read < READ_BUFSIZE)
#  387|               {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def173]
coreutils-9.5-build/coreutils-9.5/src/hostname.c: scope_hint: In function 'single_binary_main_hostname'
coreutils-9.5-build/coreutils-9.5/src/hostname.c:108:7: warning[-Wanalyzer-malloc-leak]: leak of 'xgethostname()'
#  106|         if (hostname == nullptr)
#  107|           error (EXIT_FAILURE, errno, _("cannot determine hostname"));
#  108|->       puts (hostname);
#  109|       }
#  110|   

Error: CPPCHECK_WARNING: [#def174]
coreutils-9.5-build/coreutils-9.5/src/id.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def175]
coreutils-9.5-build/coreutils-9.5/src/install.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def176]
coreutils-9.5-build/coreutils-9.5/src/iopoll.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def177]
coreutils-9.5-build/coreutils-9.5/src/join.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def178]
coreutils-9.5-build/coreutils-9.5/src/libstdbuf.c: scope_hint: In function 'apply_mode'
coreutils-9.5-build/coreutils-9.5/src/libstdbuf.c:128:6: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
#  126|       }
#  127|   
#  128|->   if (setvbuf (stream, buf, setvbuf_mode, size) != 0)
#  129|       {
#  130|         fprintf (stderr, _("could not set buffering of %s to mode %s\n"),

Error: CLANG_WARNING: [#def179]
coreutils-9.5-build/coreutils-9.5/src/libstdbuf.c:134:1: warning[unix.Malloc]: Potential leak of memory pointed to by 'buf'
#  132|         free (buf);
#  133|       }
#  134|-> }
#  135|   
#  136|   /* Use __attribute to avoid elision of __attribute__ on SUNPRO_C etc.  */

Error: CPPCHECK_WARNING: [#def180]
coreutils-9.5-build/coreutils-9.5/src/ln.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def181]
coreutils-9.5-build/coreutils-9.5/src/ls.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def182]
coreutils-9.5-build/coreutils-9.5/src/ls.c:5155:28: warning[core.DivideZero]: Division by zero
# 5153|     /* Calculate the number of rows that will be in each column except possibly
# 5154|        for a short column on the right.  */
# 5155|->   size_t rows = cwd_n_used / cols + (cwd_n_used % cols != 0);
# 5156|   
# 5157|     for (row = 0; row < rows; row++)

Error: CLANG_WARNING: [#def183]
coreutils-9.5-build/coreutils-9.5/src/ls.c:5199:28: warning[core.DivideZero]: Division by zero
# 5197|     for (filesno = 1; filesno < cwd_n_used; ++filesno)
# 5198|       {
# 5199|->       size_t col = filesno % cols;
# 5200|   
# 5201|         if (col == 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def184]
coreutils-9.5-build/coreutils-9.5/src/ls.c: scope_hint: In function 'init_column_info'
coreutils-9.5-build/coreutils-9.5/src/ls.c:5359:25: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
# 5357|           }
# 5358|   
# 5359|->       column_info_alloc = new_column_info_alloc;
# 5360|       }
# 5361|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def185]
coreutils-9.5-build/coreutils-9.5/src/ls.c:5371:1: warning[-Wanalyzer-malloc-leak]: leak of 'p'
# 5369|           column_info[i].col_arr[j] = MIN_COLUMN_WIDTH;
# 5370|       }
# 5371|-> }
# 5372|   
# 5373|   /* Calculate the number of columns needed to represent the current set

Error: CPPCHECK_WARNING: [#def186]
coreutils-9.5-build/coreutils-9.5/src/make-prime-list.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def187]
coreutils-9.5-build/coreutils-9.5/src/mkdir.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def188]
coreutils-9.5-build/coreutils-9.5/src/mkfifo.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def189]
coreutils-9.5-build/coreutils-9.5/src/mknod.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def190]
coreutils-9.5-build/coreutils-9.5/src/mktemp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def191]
coreutils-9.5-build/coreutils-9.5/src/mv.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def192]
coreutils-9.5-build/coreutils-9.5/src/nice.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def193]
coreutils-9.5-build/coreutils-9.5/src/nl.c:395:11: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
#  393|       return Text;
#  394|     if (len == header_del_len
#  395|->       && !memcmp (line_buf.buffer, header_del, header_del_len))
#  396|       return Header;
#  397|     if (len == body_del_len

Error: CLANG_WARNING: [#def194]
coreutils-9.5-build/coreutils-9.5/src/nl.c:398:11: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
#  396|       return Header;
#  397|     if (len == body_del_len
#  398|->       && !memcmp (line_buf.buffer, body_del, body_del_len))
#  399|       return Body;
#  400|     if (len == footer_del_len

Error: CLANG_WARNING: [#def195]
coreutils-9.5-build/coreutils-9.5/src/nl.c:401:11: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
#  399|       return Body;
#  400|     if (len == footer_del_len
#  401|->       && !memcmp (line_buf.buffer, footer_del, footer_del_len))
#  402|       return Footer;
#  403|     return Text;

Error: CPPCHECK_WARNING: [#def196]
coreutils-9.5-build/coreutils-9.5/src/nohup.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def197]
coreutils-9.5-build/coreutils-9.5/src/nohup.c: scope_hint: In function 'single_binary_main_nohup'
coreutils-9.5-build/coreutils-9.5/src/nohup.c:164:18: warning[-Wanalyzer-malloc-leak]: leak of 'in_home'
coreutils-9.5-build/coreutils-9.5/src/system.h:73: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/src/nohup.c:24: included_from: Included from here.
#  162|                 int saved_errno2 = errno;
#  163|                 error (0, saved_errno, _("failed to open %s"), quoteaf (file));
#  164|->               if (in_home)
#  165|                   error (0, saved_errno2, _("failed to open %s"),
#  166|                          quoteaf (in_home));

Error: CPPCHECK_WARNING: [#def198]
coreutils-9.5-build/coreutils-9.5/src/numfmt.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-415): [#def199]
coreutils-9.5-build/coreutils-9.5/src/numfmt.c:863: error[doubleFree]: Memory pointed to by 't_string' is freed twice.
#  861|       }
#  862|   
#  863|->   free (t_string);
#  864|   
#  865|     return n;

Error: CPPCHECK_WARNING: [#def200]
coreutils-9.5-build/coreutils-9.5/src/od.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def201]
coreutils-9.5-build/coreutils-9.5/src/paste.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def202]
coreutils-9.5-build/coreutils-9.5/src/paste.c: scope_hint: In function 'paste_parallel'
coreutils-9.5-build/coreutils-9.5/src/paste.c:180:20: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(nfiles + 2)'
coreutils-9.5-build/coreutils-9.5/src/paste.c:43: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/src/system.h:186:30: note: in definition of macro 'STREQ'
#  178|     /* Streams open to the files to process; null if the corresponding
#  179|        stream is closed.  */
#  180|->   FILE **fileptr = xnmalloc (nfiles + 1, sizeof *fileptr);
#  181|   
#  182|     /* Number of files still open to process.  */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def203]
coreutils-9.5-build/coreutils-9.5/src/paste.c:194:25: warning[-Wanalyzer-malloc-leak]: leak of 'xnmalloc(nfiles + 1, 8)'
coreutils-9.5-build/coreutils-9.5/src/system.h:186:30: note: in definition of macro 'STREQ'
coreutils-9.5-build/coreutils-9.5/src/system.h:186:30: note: in definition of macro 'STREQ'
coreutils-9.5-build/coreutils-9.5/src/system.h:186:30: note: in definition of macro 'STREQ'
#  192|     for (files_open = 0; files_open < nfiles; ++files_open)
#  193|       {
#  194|->       if (STREQ (fnamptr[files_open], "-"))
#  195|           {
#  196|             have_read_stdin = true;

Error: CPPCHECK_WARNING: [#def204]
coreutils-9.5-build/coreutils-9.5/src/pathchk.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def205]
coreutils-9.5-build/coreutils-9.5/src/pinky.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def206]
coreutils-9.5-build/coreutils-9.5/src/pinky.c: scope_hint: In function 'print_entry'
coreutils-9.5-build/coreutils-9.5/src/pinky.c:312:1: warning[-Wanalyzer-malloc-leak]: leak of 'host'
coreutils-9.5-build/coreutils-9.5/src/pinky.c:529:1: note: in expansion of macro 'main'
coreutils-9.5-build/coreutils-9.5/src/pinky.c:30: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/src/pinky.c:450:11: note: in expansion of macro 'IS_USER_PROCESS'
coreutils-9.5-build/coreutils-9.5/lib/dirname.h:29: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/src/system.h:257: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/src/pinky.c:26: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/lib/filename.h:93:23: note: in definition of macro 'ISSLASH'
coreutils-9.5-build/coreutils-9.5/src/pinky.c:211:7: note: in expansion of macro 'IS_ABSOLUTE_FILE_NAME'
coreutils-9.5-build/coreutils-9.5/src/system.h:254: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/src/pinky.c:298:7: note: in expansion of macro 'fputc'
coreutils-9.5-build/coreutils-9.5/src/pinky.c:311:3: note: in expansion of macro 'putchar'
coreutils-9.5-build/coreutils-9.5/src/pinky.c: scope_hint: In function 'print_entry'
#  310|   
#  311|     putchar ('\n');
#  312|-> }
#  313|   
#  314|   /* Display a verbose line of information about UTMP_ENT. */

Error: CPPCHECK_WARNING: [#def207]
coreutils-9.5-build/coreutils-9.5/src/pr.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def208]
coreutils-9.5-build/coreutils-9.5/src/pr.c:985:35: warning[core.NullDereference]: Array access (from variable 'file_names') results in a null pointer dereference
#  983|             if (! (first_page_number == 0
#  984|                    && *optarg == '+' && first_last_page (-2, '+', optarg + 1)))
#  985|->             file_names[n_files++] = optarg;
#  986|             break;
#  987|   

Error: CLANG_WARNING: [#def209]
coreutils-9.5-build/coreutils-9.5/src/pr.c:1210:29: warning[core.NullDereference]: Array access (from variable 'file_names') results in a null pointer dereference
# 1208|     for (; optind < argc; optind++)
# 1209|       {
# 1210|->       file_names[n_files++] = argv[optind];
# 1211|       }
# 1212|   

Error: CPPCHECK_WARNING: [#def210]
coreutils-9.5-build/coreutils-9.5/src/printenv.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def211]
coreutils-9.5-build/coreutils-9.5/src/printf.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def212]
coreutils-9.5-build/coreutils-9.5/src/ptx.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-688): [#def213]
coreutils-9.5-build/coreutils-9.5/src/ptx.c: scope_hint: In function 'digest_word_file'
coreutils-9.5-build/coreutils-9.5/src/ptx.c:733:3: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
coreutils-9.5-build/coreutils-9.5/src/ptx.c:1795:1: note: in expansion of macro 'main'
coreutils-9.5-build/coreutils-9.5/src/ptx.c: scope_hint: In function 'digest_word_file'
coreutils-9.5-build/coreutils-9.5/single/lib/stdlib.h:36: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/src/system.h:82: included_from: Included from here.
/usr/include/stdlib.h:970:13: note: argument 1 of 'qsort' must be non-null
#  731|     /* Finally, sort all the words read.  */
#  732|   
#  733|->   qsort (table->start, table->length, sizeof table->start[0], compare_words);
#  734|   }
#  735|   

Error: CLANG_WARNING: [#def214]
coreutils-9.5-build/coreutils-9.5/src/ptx.c:733:3: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  731|     /* Finally, sort all the words read.  */
#  732|   
#  733|->   qsort (table->start, table->length, sizeof table->start[0], compare_words);
#  734|   }
#  735|   

Error: CPPCHECK_WARNING: [#def215]
coreutils-9.5-build/coreutils-9.5/src/pwd.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def216]
coreutils-9.5-build/coreutils-9.5/src/readlink.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def217]
coreutils-9.5-build/coreutils-9.5/src/realpath.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def218]
coreutils-9.5-build/coreutils-9.5/src/relpath.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def219]
coreutils-9.5-build/coreutils-9.5/src/remove.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def220]
coreutils-9.5-build/coreutils-9.5/src/rmdir.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def221]
coreutils-9.5-build/coreutils-9.5/src/runcon.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def222]
coreutils-9.5-build/coreutils-9.5/src/selinux.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def223]
coreutils-9.5-build/coreutils-9.5/src/selinux.c:314:22: warning[deadcode.DeadStores]: Although the value stored to 'ent' is used in the enclosing expression, the value is never actually read from 'ent'
#  312|   
#  313|     int err = 0;
#  314|->   for (FTSENT *ent; (ent = fts_read (fts)); )
#  315|       if (restorecon_private (selabel_handle, fts->fts_path) < 0)
#  316|         err = errno;

Error: CPPCHECK_WARNING: [#def224]
coreutils-9.5-build/coreutils-9.5/src/seq.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def225]
coreutils-9.5-build/coreutils-9.5/src/seq.c: scope_hint: In function 'seq_fast'
coreutils-9.5-build/coreutils-9.5/src/seq.c:485:11: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(inc_size + 1)'
#  483|       {
#  484|         q0 = xmalloc (inc_size + 1);
#  485|->       q = memcpy (q0 + inc_size - q_len, b, q_len + 1);
#  486|       }
#  487|     else

Error: CPPCHECK_WARNING: [#def226]
coreutils-9.5-build/coreutils-9.5/src/set-fields.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def227]
coreutils-9.5-build/coreutils-9.5/src/shred.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def228]
coreutils-9.5-build/coreutils-9.5/src/shuf.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def229]
coreutils-9.5-build/coreutils-9.5/src/sort.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-457): [#def230]
coreutils-9.5-build/coreutils-9.5/src/sort.c:1160: warning[uninitvar]: Uninitialized variable: pid
# 1158|       }
# 1159|   
# 1160|->   if (pid < 0)
# 1161|       {
# 1162|         saved_errno = errno;

Error: CPPCHECK_WARNING (CWE-457): [#def231]
coreutils-9.5-build/coreutils-9.5/src/sort.c:4776: warning[uninitvar]: Uninitialized variable: buf.buf
# 4774|   
# 4775|    finish:
# 4776|->   free (buf.buf);
# 4777|   
# 4778|     if (! output_file_created)

Error: CPPCHECK_WARNING: [#def232]
coreutils-9.5-build/coreutils-9.5/src/split.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def233]
coreutils-9.5-build/coreutils-9.5/src/stat.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def234]
coreutils-9.5-build/coreutils-9.5/src/stdbuf.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def235]
coreutils-9.5-build/coreutils-9.5/src/stty.c:1503:30: warning[core.NullDereference]: Access to field 'c_cflag' results in a dereference of a null pointer (loaded from variable 'mode')
# 1501|           {
# 1502|             if (reversed)
# 1503|->             mode->c_cflag = (mode->c_cflag & ~PARENB & ~CSIZE) | CS8;
# 1504|             else
# 1505|               mode->c_cflag = (mode->c_cflag & ~PARODD & ~CSIZE) | PARENB | CS7;

Error: CLANG_WARNING: [#def236]
coreutils-9.5-build/coreutils-9.5/src/stty.c:1505:30: warning[core.NullDereference]: Access to field 'c_cflag' results in a dereference of a null pointer (loaded from variable 'mode')
# 1503|               mode->c_cflag = (mode->c_cflag & ~PARENB & ~CSIZE) | CS8;
# 1504|             else
# 1505|->             mode->c_cflag = (mode->c_cflag & ~PARODD & ~CSIZE) | PARENB | CS7;
# 1506|           }
# 1507|         else if (STREQ (info->name, "oddp"))

Error: CLANG_WARNING: [#def237]
coreutils-9.5-build/coreutils-9.5/src/stty.c:1510:30: warning[core.NullDereference]: Access to field 'c_cflag' results in a dereference of a null pointer (loaded from variable 'mode')
# 1508|           {
# 1509|             if (reversed)
# 1510|->             mode->c_cflag = (mode->c_cflag & ~PARENB & ~CSIZE) | CS8;
# 1511|             else
# 1512|               mode->c_cflag = (mode->c_cflag & ~CSIZE) | CS7 | PARODD | PARENB;

Error: CLANG_WARNING: [#def238]
coreutils-9.5-build/coreutils-9.5/src/stty.c:1512:30: warning[core.NullDereference]: Access to field 'c_cflag' results in a dereference of a null pointer (loaded from variable 'mode')
# 1510|               mode->c_cflag = (mode->c_cflag & ~PARENB & ~CSIZE) | CS8;
# 1511|             else
# 1512|->             mode->c_cflag = (mode->c_cflag & ~CSIZE) | CS7 | PARODD | PARENB;
# 1513|           }
# 1514|         else if (STREQ (info->name, "nl"))

Error: CLANG_WARNING: [#def239]
coreutils-9.5-build/coreutils-9.5/src/stty.c:1518:32: warning[core.NullDereference]: Access to field 'c_iflag' results in a dereference of a null pointer (loaded from variable 'mode')
# 1516|             if (reversed)
# 1517|               {
# 1518|->               mode->c_iflag = (mode->c_iflag | ICRNL) & ~INLCR & ~IGNCR;
# 1519|                 mode->c_oflag = (mode->c_oflag
# 1520|   #ifdef ONLCR

Error: CLANG_WARNING: [#def240]
coreutils-9.5-build/coreutils-9.5/src/stty.c:1534:31: warning[core.NullDereference]: Access to field 'c_iflag' results in a dereference of a null pointer (loaded from variable 'mode')
# 1532|             else
# 1533|               {
# 1534|->               mode->c_iflag = mode->c_iflag & ~ICRNL;
# 1535|   #ifdef ONLCR
# 1536|                 mode->c_oflag = mode->c_oflag & ~ONLCR;

Error: CLANG_WARNING: [#def241]
coreutils-9.5-build/coreutils-9.5/src/stty.c:1542:30: warning[core.NullDereference]: Array access (via field 'c_cc') results in a null pointer dereference
# 1540|         else if (STREQ (info->name, "ek"))
# 1541|           {
# 1542|->           mode->c_cc[VERASE] = CERASE;
# 1543|             mode->c_cc[VKILL] = CKILL;
# 1544|           }

Error: CLANG_WARNING: [#def242]
coreutils-9.5-build/coreutils-9.5/src/stty.c:1550:27: warning[core.NullDereference]: Access to field 'c_lflag' results in a dereference of a null pointer (loaded from variable 'mode')
# 1548|           {
# 1549|             if (reversed)
# 1550|->             mode->c_lflag |= ICANON;
# 1551|             else
# 1552|               mode->c_lflag &= ~ICANON;

Error: CLANG_WARNING: [#def243]
coreutils-9.5-build/coreutils-9.5/src/stty.c:1552:27: warning[core.NullDereference]: Access to field 'c_lflag' results in a dereference of a null pointer (loaded from variable 'mode')
# 1550|               mode->c_lflag |= ICANON;
# 1551|             else
# 1552|->             mode->c_lflag &= ~ICANON;
# 1553|           }
# 1554|         else if (STREQ (info->name, "pass8"))

Error: CLANG_WARNING: [#def244]
coreutils-9.5-build/coreutils-9.5/src/stty.c:1558:32: warning[core.NullDereference]: Access to field 'c_cflag' results in a dereference of a null pointer (loaded from variable 'mode')
# 1556|             if (reversed)
# 1557|               {
# 1558|->               mode->c_cflag = (mode->c_cflag & ~CSIZE) | CS7 | PARENB;
# 1559|                 mode->c_iflag |= ISTRIP;
# 1560|               }

Error: CLANG_WARNING: [#def245]
coreutils-9.5-build/coreutils-9.5/src/stty.c:1563:32: warning[core.NullDereference]: Access to field 'c_cflag' results in a dereference of a null pointer (loaded from variable 'mode')
# 1561|             else
# 1562|               {
# 1563|->               mode->c_cflag = (mode->c_cflag & ~PARENB & ~CSIZE) | CS8;
# 1564|                 mode->c_iflag &= ~ISTRIP;
# 1565|               }

Error: CLANG_WARNING: [#def246]
coreutils-9.5-build/coreutils-9.5/src/stty.c:1571:32: warning[core.NullDereference]: Access to field 'c_cflag' results in a dereference of a null pointer (loaded from variable 'mode')
# 1569|             if (reversed)
# 1570|               {
# 1571|->               mode->c_cflag = (mode->c_cflag & ~CSIZE) | CS7 | PARENB;
# 1572|                 mode->c_iflag |= ISTRIP;
# 1573|                 mode->c_oflag |= OPOST;

Error: CLANG_WARNING: [#def247]
coreutils-9.5-build/coreutils-9.5/src/stty.c:1577:32: warning[core.NullDereference]: Access to field 'c_cflag' results in a dereference of a null pointer (loaded from variable 'mode')
# 1575|             else
# 1576|               {
# 1577|->               mode->c_cflag = (mode->c_cflag & ~PARENB & ~CSIZE) | CS8;
# 1578|                 mode->c_iflag &= ~ISTRIP;
# 1579|                 mode->c_oflag &= ~OPOST;

Error: CLANG_WARNING: [#def248]
coreutils-9.5-build/coreutils-9.5/src/stty.c:1588:29: warning[core.NullDereference]: Access to field 'c_iflag' results in a dereference of a null pointer (loaded from variable 'mode')
# 1586|               {
# 1587|                 /* Cooked mode. */
# 1588|->               mode->c_iflag |= BRKINT | IGNPAR | ISTRIP | ICRNL | IXON;
# 1589|                 mode->c_oflag |= OPOST;
# 1590|                 mode->c_lflag |= ISIG | ICANON;

Error: CLANG_WARNING: [#def249]
coreutils-9.5-build/coreutils-9.5/src/stty.c:1601:29: warning[core.NullDereference]: Access to field 'c_iflag' results in a dereference of a null pointer (loaded from variable 'mode')
# 1599|               {
# 1600|                 /* Raw mode. */
# 1601|->               mode->c_iflag = 0;
# 1602|                 mode->c_oflag &= ~OPOST;
# 1603|                 mode->c_lflag &= ~(ISIG | ICANON

Error: CLANG_WARNING: [#def250]
coreutils-9.5-build/coreutils-9.5/src/stty.c:1616:27: warning[core.NullDereference]: Access to field 'c_iflag' results in a dereference of a null pointer (loaded from variable 'mode')
# 1614|           {
# 1615|             if (reversed)
# 1616|->             mode->c_iflag |= IXANY;
# 1617|             else
# 1618|               mode->c_iflag &= ~IXANY;

Error: CLANG_WARNING: [#def251]
coreutils-9.5-build/coreutils-9.5/src/stty.c:1618:27: warning[core.NullDereference]: Access to field 'c_iflag' results in a dereference of a null pointer (loaded from variable 'mode')
# 1616|               mode->c_iflag |= IXANY;
# 1617|             else
# 1618|->             mode->c_iflag &= ~IXANY;
# 1619|           }
# 1620|   #endif

Error: CLANG_WARNING: [#def252]
coreutils-9.5-build/coreutils-9.5/src/stty.c:1625:30: warning[core.NullDereference]: Access to field 'c_oflag' results in a dereference of a null pointer (loaded from variable 'mode')
# 1623|           {
# 1624|             if (reversed)
# 1625|->             mode->c_oflag = (mode->c_oflag & ~TABDLY) | TAB3;
# 1626|             else
# 1627|               mode->c_oflag = (mode->c_oflag & ~TABDLY) | TAB0;

Error: CLANG_WARNING: [#def253]
coreutils-9.5-build/coreutils-9.5/src/stty.c:1627:30: warning[core.NullDereference]: Access to field 'c_oflag' results in a dereference of a null pointer (loaded from variable 'mode')
# 1625|               mode->c_oflag = (mode->c_oflag & ~TABDLY) | TAB3;
# 1626|             else
# 1627|->             mode->c_oflag = (mode->c_oflag & ~TABDLY) | TAB0;
# 1628|           }
# 1629|   #else

Error: CLANG_WARNING: [#def254]
coreutils-9.5-build/coreutils-9.5/src/stty.c:1646:29: warning[core.NullDereference]: Access to field 'c_lflag' results in a dereference of a null pointer (loaded from variable 'mode')
# 1644|             if (reversed)
# 1645|               {
# 1646|->               mode->c_lflag &= ~XCASE;
# 1647|                 mode->c_iflag &= ~IUCLC;
# 1648|                 mode->c_oflag &= ~OLCUC;

Error: CLANG_WARNING: [#def255]
coreutils-9.5-build/coreutils-9.5/src/stty.c:1652:29: warning[core.NullDereference]: Access to field 'c_lflag' results in a dereference of a null pointer (loaded from variable 'mode')
# 1650|             else
# 1651|               {
# 1652|->               mode->c_lflag |= XCASE;
# 1653|                 mode->c_iflag |= IUCLC;
# 1654|                 mode->c_oflag |= OLCUC;

Error: CLANG_WARNING: [#def256]
coreutils-9.5-build/coreutils-9.5/src/stty.c:1659:23: warning[core.NullDereference]: Access to field 'c_lflag' results in a dereference of a null pointer (loaded from variable 'mode')
# 1657|   #endif
# 1658|         else if (STREQ (info->name, "crt"))
# 1659|->         mode->c_lflag |= ECHOE
# 1660|   #ifdef ECHOCTL
# 1661|             | ECHOCTL

Error: CLANG_WARNING: [#def257]
coreutils-9.5-build/coreutils-9.5/src/stty.c:1669:29: warning[core.NullDereference]: Array access (via field 'c_cc') results in a null pointer dereference
# 1667|         else if (STREQ (info->name, "dec"))
# 1668|           {
# 1669|->           mode->c_cc[VINTR] = 3;	/* ^C */
# 1670|             mode->c_cc[VERASE] = 127;	/* DEL */
# 1671|             mode->c_cc[VKILL] = 21;	/* ^U */

Error: CLANG_WARNING: [#def258]
coreutils-9.5-build/coreutils-9.5/src/stty.c:2284:42: warning[core.NullDereference]: Array access (via field 'c_cc') results in a null pointer dereference
# 2282|           break;
# 2283|   #endif
# 2284|->       mode->c_cc[control_info[i].offset] = control_info[i].saneval;
# 2285|       }
# 2286|   

Error: CPPCHECK_WARNING: [#def259]
coreutils-9.5-build/coreutils-9.5/src/sum.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def260]
coreutils-9.5-build/coreutils-9.5/src/sync.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def261]
coreutils-9.5-build/coreutils-9.5/src/df.c:28: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/src/df.c: scope_hint: In function 'decode_output_arg'
coreutils-9.5-build/coreutils-9.5/src/system.h:186:22: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(arg)'
coreutils-9.5-build/coreutils-9.5/src/df.c:453:15: note: in expansion of macro 'STREQ'
coreutils-9.5-build/coreutils-9.5/src/df.c:453:15: note: in expansion of macro 'STREQ'
coreutils-9.5-build/coreutils-9.5/lib/assure.h:23: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/src/df.c:29: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/src/df.c:426:3: note: in expansion of macro 'affirm'
coreutils-9.5-build/coreutils-9.5/src/df.c:453:15: note: in expansion of macro 'STREQ'
coreutils-9.5-build/coreutils-9.5/src/df.c:453:15: note: in expansion of macro 'STREQ'
#  184|   }
#  185|   
#  186|-> #define STREQ(a, b) (strcmp (a, b) == 0)
#  187|   #define STREQ_LEN(a, b, n) (strncmp (a, b, n) == 0) /* n==-1 means unbounded */
#  188|   #define STRPREFIX(a, b) (strncmp (a, b, strlen (b)) == 0)

Error: CPPCHECK_WARNING: [#def262]
coreutils-9.5-build/coreutils-9.5/src/tac.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def263]
coreutils-9.5-build/coreutils-9.5/src/tail.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def264]
coreutils-9.5-build/coreutils-9.5/src/tail.c:840:35: warning[core.NullDereference]: Access to field 'nbytes' results in a dereference of a null pointer (loaded from variable 'tmp')
#  838|     /* Run through the list, printing characters.  First, skip over unneeded
#  839|        buffers.  */
#  840|->   for (tmp = first; total_bytes - tmp->nbytes > n_bytes; tmp = tmp->next)
#  841|       total_bytes -= tmp->nbytes;
#  842|   

Error: CPPCHECK_WARNING (CWE-758): [#def265]
coreutils-9.5-build/coreutils-9.5/src/tail.c:2402: warning[objectIndex]: The address of variable 'dummy_stdin' might be accessed at non-zero index.
# 2400|   
# 2401|       for (i = 0; i < n_files; i++)
# 2402|->       if (STREQ (file[i], "-"))
# 2403|           found_hyphen = true;
# 2404|   

Error: CPPCHECK_WARNING: [#def266]
coreutils-9.5-build/coreutils-9.5/src/tee.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def267]
coreutils-9.5-build/coreutils-9.5/src/tee.c: scope_hint: In function 'tee_files'
coreutils-9.5-build/coreutils-9.5/src/tee.c:256:3: warning[-Wanalyzer-malloc-leak]: leak of 'xnmalloc((long unsigned int)(nfiles + 1), 8)'
coreutils-9.5-build/coreutils-9.5/lib/gettext.h:26: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/src/system.h:164: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/src/tee.c:24: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/src/tee.c:255:24: note: in expansion of macro '_'
coreutils-9.5-build/coreutils-9.5/src/system.h:740: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/separate/lib/error.h:408:28: note: in definition of macro '__gl_error_call'
coreutils-9.5-build/coreutils-9.5/src/tee.c:267:11: note: in expansion of macro 'error'
coreutils-9.5-build/coreutils-9.5/separate/lib/error.h:471:7: note: in expansion of macro '__gl_error_call'
coreutils-9.5-build/coreutils-9.5/src/tee.c:267:11: note: in expansion of macro 'error'
coreutils-9.5-build/coreutils-9.5/separate/lib/error.h:413:10: note: in expansion of macro '__gl_error_call1'
coreutils-9.5-build/coreutils-9.5/separate/lib/error.h:471:7: note: in expansion of macro '__gl_error_call'
coreutils-9.5-build/coreutils-9.5/src/tee.c:267:11: note: in expansion of macro 'error'
#  254|       out_pollable[0] = iopoll_output_ok (fileno (descriptors[0]));
#  255|     files[0] = bad_cast (_("standard output"));
#  256|->   setvbuf (stdout, nullptr, _IONBF, 0);
#  257|     n_outputs++;
#  258|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def268]
coreutils-9.5-build/coreutils-9.5/src/tee.c:262:37: warning[-Wanalyzer-malloc-leak]: leak of 'xnmalloc((long unsigned int)(nfiles + 1), 8)'
coreutils-9.5-build/coreutils-9.5/src/tee.c:255:24: note: in expansion of macro '_'
coreutils-9.5-build/coreutils-9.5/separate/lib/error.h:408:28: note: in definition of macro '__gl_error_call'
coreutils-9.5-build/coreutils-9.5/src/tee.c:267:11: note: in expansion of macro 'error'
coreutils-9.5-build/coreutils-9.5/separate/lib/error.h:471:7: note: in expansion of macro '__gl_error_call'
coreutils-9.5-build/coreutils-9.5/src/tee.c:267:11: note: in expansion of macro 'error'
coreutils-9.5-build/coreutils-9.5/separate/lib/error.h:413:10: note: in expansion of macro '__gl_error_call1'
coreutils-9.5-build/coreutils-9.5/separate/lib/error.h:471:7: note: in expansion of macro '__gl_error_call'
coreutils-9.5-build/coreutils-9.5/src/tee.c:267:11: note: in expansion of macro 'error'
#  260|       {
#  261|         /* Do not treat "-" specially - as mandated by POSIX.  */
#  262|->        descriptors[i] = fopen (files[i], mode_string);
#  263|         if (descriptors[i] == nullptr)
#  264|           {

Error: CPPCHECK_WARNING (CWE-401): [#def269]
coreutils-9.5-build/coreutils-9.5/src/temp-stream.c:96: error[memleakOnRealloc]: Common realloc mistake: 'tempbuf' nulled but not freed upon failure
#   94|         while (true)
#   95|           {
#   96|->           if (! (tempbuf = realloc (tempbuf, tempbuf_len)))
#   97|               {
#   98|                 error (0, errno, _("failed to make temporary file name"));

Error: CPPCHECK_WARNING: [#def270]
coreutils-9.5-build/coreutils-9.5/src/timeout.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def271]
coreutils-9.5-build/coreutils-9.5/src/touch.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def272]
coreutils-9.5-build/coreutils-9.5/src/tr.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def273]
coreutils-9.5-build/coreutils-9.5/src/tr.c:1817:21: warning[core.NullDereference]: Access to field 'state' results in a dereference of a null pointer (loaded from variable 's2')
# 1815|   
# 1816|             set_initialize (s1, false, in_s1);
# 1817|->           s2->state = BEGIN_STATE;
# 1818|             for (int i = 0; i < N_CHARS; i++)
# 1819|               xlate[i] = i;

Error: CPPCHECK_WARNING: [#def274]
coreutils-9.5-build/coreutils-9.5/src/truncate.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def275]
coreutils-9.5-build/coreutils-9.5/src/tsort.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def276]
coreutils-9.5-build/coreutils-9.5/src/tsort.c:422:6: warning[-Wanalyzer-malloc-leak]: leak of 'xzalloc(56)'
coreutils-9.5-build/coreutils-9.5/src/tsort.c: scope_hint: In function 'tsort'
coreutils-9.5-build/coreutils-9.5/src/tsort.c: scope_hint: In function 'tsort'
#  420|   walk_tree (struct item *root, bool (*action) (struct item *))
#  421|   {
#  422|->   if (root->right)
#  423|       recurse_tree (root->right, action);
#  424|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def277]
coreutils-9.5-build/coreutils-9.5/src/tsort.c:443:3: warning[-Wanalyzer-malloc-leak]: leak of 'xzalloc(56)'
coreutils-9.5-build/coreutils-9.5/src/tsort.c: scope_hint: In function 'tsort'
coreutils-9.5-build/coreutils-9.5/lib/assure.h:23: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/src/tsort.c:28: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/src/tsort.c:458:7: note: in expansion of macro 'affirm'
#  441|       error (EXIT_FAILURE, errno, "%s", quotef (file));
#  442|   
#  443|->   fadvise (stdin, FADVISE_SEQUENTIAL);
#  444|   
#  445|     init_tokenbuffer (&tokenbuffer);

Error: CPPCHECK_WARNING: [#def278]
coreutils-9.5-build/coreutils-9.5/src/uname.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def279]
coreutils-9.5-build/coreutils-9.5/src/unexpand.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def280]
coreutils-9.5-build/coreutils-9.5/src/unexpand.c:276:19: warning[deadcode.DeadStores]: Value stored to 'next_tab_column' is never read
#  274|                        next tab stop.  */
#  275|                     column -= !!column;
#  276|->                   next_tab_column = column;
#  277|                     tab_index -= !!tab_index;
#  278|                   }

Error: CPPCHECK_WARNING: [#def281]
coreutils-9.5-build/coreutils-9.5/src/uniq.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def282]
coreutils-9.5-build/coreutils-9.5/src/wc.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING: [#def283]
coreutils-9.5-build/coreutils-9.5/src/wc_avx2.c: scope_hint: In function 'wc_lines_avx2'
coreutils-9.5-build/coreutils-9.5/src/wc_avx2.c:38:5: warning[-Wpsabi]: AVX vector return without AVX enabled changes the ABI
#   36|   
#   37|     __m256i
#   38|->     zeroes = _mm256_setzero_si256 (),
#   39|       endlines = _mm256_set1_epi8 ('\n');
#   40|   

Error: CPPCHECK_WARNING: [#def284]
coreutils-9.5-build/coreutils-9.5/src/who.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def285]
coreutils-9.5-build/coreutils-9.5/src/who.c:399:16: warning[core.NullDereference]: Dereference of null pointer
#  397|               }
#  398|             char *p = hoststr;
#  399|->           *p++ = '(';
#  400|             p = stpcpy (p, host);
#  401|             *p++ = ':';

Error: GCC_ANALYZER_WARNING (CWE-401): [#def286]
coreutils-9.5-build/coreutils-9.5/src/who.c: scope_hint: In function 'print_user'
coreutils-9.5-build/coreutils-9.5/src/who.c:432:1: warning[-Wanalyzer-malloc-leak]: leak of 'host'
coreutils-9.5-build/coreutils-9.5/src/who.c:685:1: note: in expansion of macro 'main'
coreutils-9.5-build/coreutils-9.5/lib/dirname.h:29: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/src/system.h:257: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/src/who.c:31: included_from: Included from here.
coreutils-9.5-build/coreutils-9.5/lib/filename.h:93:23: note: in definition of macro 'ISSLASH'
coreutils-9.5-build/coreutils-9.5/src/who.c:339:7: note: in expansion of macro 'IS_ABSOLUTE_FILE_NAME'
coreutils-9.5-build/coreutils-9.5/src/who.c: scope_hint: In function 'print_user'
#  430|                 time_string (utmp_ent), idlestr, pidstr,
#  431|                 hoststr ? hoststr : "", "");
#  432|-> }
#  433|   
#  434|   static void

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-190.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namecoreutils-9.5-2.fc41
store-results-to/tmp/tmp5xb8xak4/coreutils-9.5-2.fc41.tar.xz
time-created2024-07-03 12:23:36
time-finished2024-07-03 12:30:53
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp5xb8xak4/coreutils-9.5-2.fc41.tar.xz' '--gcc-analyze' '/tmp/tmp5xb8xak4/coreutils-9.5-2.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9