findutils-4.10.0-2.fc41

List of Defects

Error: CPPCHECK_WARNING: [#def1]
findutils-4.10.0-build/findutils-4.10.0/find/exec.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
findutils-4.10.0-build/findutils-4.10.0/find/fstype.c: scope_hint: In function 'file_system_type_uncached'
findutils-4.10.0-build/findutils-4.10.0/find/fstype.c:269:22: warning[-Wanalyzer-malloc-leak]: leak of 'type'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/gettext.h:26: included_from: Included from here.
findutils-4.10.0-build/findutils-4.10.0/lib/system.h:26: included_from: Included from here.
findutils-4.10.0-build/findutils-4.10.0/find/fstype.c:58: included_from: Included from here.
findutils-4.10.0-build/findutils-4.10.0/find/fstype.c:269:33: note: in expansion of macro '_'
#  267|     *fstype_known = (type != NULL);
#  268|   
#  269|->   return type ? type : xstrdup (_("unknown"));
#  270|   }
#  271|   

Error: CPPCHECK_WARNING: [#def3]
findutils-4.10.0-build/findutils-4.10.0/find/ftsfind.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
findutils-4.10.0-build/findutils-4.10.0/find/ftsfind.c: scope_hint: In function 'process_all_startpoints'
findutils-4.10.0-build/findutils-4.10.0/find/ftsfind.c:624:22: warning[-Wanalyzer-malloc-leak]: leak of 'rpl_fopen(options.files0_from, "r")'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/argv-iter.h:22: included_from: Included from here.
findutils-4.10.0-build/findutils-4.10.0/find/ftsfind.c:41: included_from: Included from here.
findutils-4.10.0-build/findutils-4.10.0/find/ftsfind.c:33: included_from: Included from here.
findutils-4.10.0-build/findutils-4.10.0/find/ftsfind.c:48: included_from: Included from here.
findutils-4.10.0-build/findutils-4.10.0/gl/lib/same-inode.h:77:26: note: in expansion of macro 'PSAME_INODE'
findutils-4.10.0-build/findutils-4.10.0/find/ftsfind.c:635:24: note: in expansion of macro 'SAME_INODE'
#  622|             const int fd = fileno (stream);
#  623|             assert (fd >= 0);
#  624|->           if (options.ok_prompt_stdin)
#  625|               {
#  626|                 /* Check if the given file is associated to the same stream as

Error: CLANG_WARNING: [#def5]
findutils-4.10.0-build/findutils-4.10.0/find/ftsfind.c:732:37: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  730|     argv_iter_free (ai);
#  731|   
#  732|->   if (ok && options.files0_from && (ferror (stream) || fclose (stream) != 0))
#  733|       error (EXIT_FAILURE, 0, _("error reading %s"), files0_filename_quoted);
#  734|   

Error: GCC_ANALYZER_WARNING (CWE-121): [#def6]
findutils-4.10.0-build/findutils-4.10.0/find/getlimits.c: scope_hint: In function 'main'
findutils-4.10.0-build/findutils-4.10.0/find/getlimits.c:67:3: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
findutils-4.10.0-build/findutils-4.10.0/find/getlimits.c:71:3: note: in expansion of macro 'print_int'
findutils-4.10.0-build/findutils-4.10.0/find/getlimits.c:71:3: note: in expansion of macro 'print_int'
findutils-4.10.0-build/findutils-4.10.0/find/getlimits.c:67:3: note: write of 1 byte to beyond the end of 'limit'
findutils-4.10.0-build/findutils-4.10.0/find/getlimits.c:71:3: note: in expansion of macro 'print_int'
findutils-4.10.0-build/findutils-4.10.0/find/getlimits.c:67:3: note: valid subscripts for 'limit' are '[0]' to '[99]'
findutils-4.10.0-build/findutils-4.10.0/find/getlimits.c:71:3: note: in expansion of macro 'print_int'
#   65|   
#   66|   #define print_int(TYPE)                                      \
#   67|->   sprintf (limit + 1, "%" "ju", (uintmax_t) TYPE##_MAX);     \
#   68|     printf (#TYPE"_MAX=%s\n", limit + 1);                      \
#   69|     printf (#TYPE"_OFLOW=%s\n", decimal_absval_add_one (limit))

Error: CPPCHECK_WARNING: [#def7]
findutils-4.10.0-build/findutils-4.10.0/find/parser.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
findutils-4.10.0-build/findutils-4.10.0/find/parser.c: scope_hint: In function 'parse_perm'
findutils-4.10.0-build/findutils-4.10.0/find/parser.c:1837:20: warning[-Wanalyzer-malloc-leak]: leak of 'mode_compile(*<unknown> + (sizetype)mode_start)'
findutils-4.10.0-build/findutils-4.10.0/find/parser.c: scope_hint: In function 'parse_perm'
# 1835|        and it would be confusing if 'find' continued to support it.  */
# 1836|     if (NULL == change
# 1837|->       || (perm_expr[0] == '+' && '0' <= perm_expr[1] && perm_expr[1] < '8'))
# 1838|       {
# 1839|         error (EXIT_FAILURE, 0, _("invalid mode %s"),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
findutils-4.10.0-build/findutils-4.10.0/find/parser.c: scope_hint: In function 'parse_printf'
findutils-4.10.0-build/findutils-4.10.0/find/parser.c:1928:1: warning[-Wanalyzer-malloc-leak]: leak of 'fmt.quote_opts'
findutils-4.10.0-build/findutils-4.10.0/find/parser.c: scope_hint: In function 'parse_printf'
findutils-4.10.0-build/findutils-4.10.0/find/parser.c: scope_hint: In function 'parse_printf'
findutils-4.10.0-build/findutils-4.10.0/find/parser.c: scope_hint: In function 'parse_printf'
# 1926|       }
# 1927|     return false;
# 1928|-> }
# 1929|   
# 1930|   static bool

Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
findutils-4.10.0-build/findutils-4.10.0/find/parser.c: scope_hint: In function 'parse_fprintf'
findutils-4.10.0-build/findutils-4.10.0/find/parser.c:1951:1: warning[-Wanalyzer-malloc-leak]: leak of 'fmt.quote_opts'
findutils-4.10.0-build/findutils-4.10.0/find/parser.c: scope_hint: In function 'parse_fprintf'
findutils-4.10.0-build/findutils-4.10.0/find/parser.c: scope_hint: In function 'parse_fprintf'
# 1949|     *arg_ptr = saved_argc; /* don't consume the invalid argument. */
# 1950|     return false;
# 1951|-> }
# 1952|   
# 1953|   static bool

Error: CLANG_WARNING: [#def11]
findutils-4.10.0-build/findutils-4.10.0/find/parser.c:2166:3: warning[deadcode.DeadStores]: Value stored to 'fd' is never read
# 2164|      * the file.
# 2165|      */
# 2166|->   fd = -3;			/* -3 means uninitialized */
# 2167|     openflags = O_RDONLY;
# 2168|   

Error: CLANG_WARNING: [#def12]
findutils-4.10.0-build/findutils-4.10.0/find/parser.c:2646:2: warning[deadcode.DeadStores]: Value stored to 'type_cell' is never read
# 2644|   	rate = 1.0e-5f;
# 2645|   #else
# 2646|-> 	type_cell = 0;
# 2647|   	error (EXIT_FAILURE, 0,
# 2648|   	       _("%s %c is not supported because Solaris doors "

Error: CLANG_WARNING: [#def13]
findutils-4.10.0-build/findutils-4.10.0/find/parser.c:2654:2: warning[deadcode.DeadStores]: Value stored to 'type_cell' is never read
# 2652|   	break;
# 2653|         default:			/* None of the above ... nuke 'em. */
# 2654|-> 	type_cell = 0;
# 2655|   	error (EXIT_FAILURE, 0,
# 2656|   	       _("Unknown argument to %s: %c"), pred_string, (*typeletter));

Error: CPPCHECK_WARNING: [#def14]
findutils-4.10.0-build/findutils-4.10.0/find/pred.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def15]
findutils-4.10.0-build/findutils-4.10.0/find/print.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def16]
findutils-4.10.0-build/findutils-4.10.0/find/print.c:620:3: warning[deadcode.DeadStores]: Value stored to 'charsprinted' is never read
#  618|     verify (sizeof (buf) >= LONGEST_HUMAN_READABLE);
#  619|   
#  620|->   charsprinted = 0;
#  621|     need_ns_suffix = 0;
#  622|   

Error: CLANG_WARNING: [#def17]
findutils-4.10.0-build/findutils-4.10.0/find/print.c:621:3: warning[deadcode.DeadStores]: Value stored to 'need_ns_suffix' is never read
#  619|   
#  620|     charsprinted = 0;
#  621|->   need_ns_suffix = 0;
#  622|   
#  623|     /* Format the main part of the time. */

Error: CPPCHECK_WARNING: [#def18]
findutils-4.10.0-build/findutils-4.10.0/find/sharefile.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def19]
findutils-4.10.0-build/findutils-4.10.0/find/sharefile.c:191:5: warning[unix.Malloc]: Potential leak of memory pointed to by 'new_entry'
#  189|   	      if (hash_insert (p->table, new_entry))
#  190|   		{
#  191|-> 		  return new_entry->fp;
#  192|   		}
#  193|   	      else			/* failed to insert in hashtable. */

Error: CPPCHECK_WARNING: [#def20]
findutils-4.10.0-build/findutils-4.10.0/find/tree.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-457): [#def21]
findutils-4.10.0-build/findutils-4.10.0/find/tree.c:1097: warning[uninitvar]: Uninitialized variable: &key.cost
# 1095|   	}
# 1096|         key.fn = p->pred_func;
# 1097|->       entry = bsearch (&key, costlookup,
# 1098|   		       sizeof(costlookup)/sizeof(costlookup[0]),
# 1099|   		       sizeof(costlookup[0]),

Error: CLANG_WARNING: [#def22]
findutils-4.10.0-build/findutils-4.10.0/find/tree.c:1184:36: warning[core.NullDereference]: Access to field 'est_success_rate' results in a dereference of a null pointer (loaded from field 'pred_right')
# 1182|         assert (pred_is (p, pred_negate));
# 1183|         assert (NULL == p->pred_left);
# 1184|->       p->est_success_rate = (1.0 - p->pred_right->est_success_rate);
# 1185|         return p->est_success_rate;
# 1186|   

Error: CPPCHECK_WARNING: [#def23]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/argmatch.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def24]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/c-strcasestr.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def25]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/canonicalize.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def26]
findutils-4.10.0-build/findutils-4.10.0/gl/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: [#def27]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/careadlinkat.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/file-set.c: scope_hint: In function 'record_file'
findutils-4.10.0-build/findutils-4.10.0/gl/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): [#def29]
findutils-4.10.0-build/findutils-4.10.0/gl/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: GCC_ANALYZER_WARNING (CWE-401): [#def30]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/fts.c:225: included_from: Included from here.
findutils-4.10.0-build/findutils-4.10.0/gl/lib/fts-cycle.c: scope_hint: In function 'enter_dir'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/fts-cycle.c:94:10: warning[-Wanalyzer-malloc-leak]: leak of 'ad'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/fts.c:1249:22: note: in expansion of macro 'ISSET'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/fts.c:1311:34: note: in expansion of macro 'fts_opendir'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/fts.c:1334:19: note: in expansion of macro 'LEAVE_DIR'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/fts.c:1334:19: note: in expansion of macro 'LEAVE_DIR'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/fts.c:1334: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: [#def31]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/fts.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def32]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/fts.c: scope_hint: In function 'filesystem_type'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/fts.c:713:12: warning[-Wanalyzer-malloc-leak]: leak of 't2'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/fts.c:717:8: note: in expansion of macro 'ISSET'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/fts.c:747:13: note: in expansion of macro 'fts_assert'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/fts.c:747:13: note: in expansion of macro 'fts_assert'
#  711|     if (ISSET(FTS_NOLEAF))
#  712|       /* leaf optimization explicitly disabled by the FTS_NOLEAF flag */
#  713|->     return 0;
#  714|   
#  715|     /* If we're not in CWDFD mode, don't bother with this optimization,

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

Error: GCC_ANALYZER_WARNING (CWE-688): [#def34]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/fts.c:1521:25: warning[-Wanalyzer-null-argument]: use of NULL 'cp' where non-null expected
findutils-4.10.0-build/findutils-4.10.0/gl/lib/fts.c:64: included_from: Included from here.
findutils-4.10.0-build/findutils-4.10.0/gl/lib/fts.c:1447:17: note: in expansion of macro '__set_errno'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/fts.c:1460:22: note: in expansion of macro 'ISSET'
<built-in>: note: argument 1 of '__builtin_memmove' must be non-null
# 1519|                   if (ISSET(FTS_NOCHDIR)) {
# 1520|                           p->fts_accpath = p->fts_path;
# 1521|->                         memmove(cp, p->fts_name, p->fts_namelen + 1);
# 1522|                   } else
# 1523|                           p->fts_accpath = p->fts_name;

Error: CPPCHECK_WARNING: [#def35]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/hash.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def36]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/human.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def37]
findutils-4.10.0-build/findutils-4.10.0/gl/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): [#def38]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/ialloc.h:60:37: warning[-Wanalyzer-malloc-leak]: leak of 'ximalloc(s + 1)'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/xmalloc.c: scope_hint: In function 'ximalloc'
findutils-4.10.0-build/findutils-4.10.0/gl/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): [#def39]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/ialloc.h:60:37: warning[-Wanalyzer-malloc-leak]: leak of 'ximalloc(s)'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/xmalloc.c: scope_hint: In function 'ximalloc'
findutils-4.10.0-build/findutils-4.10.0/gl/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): [#def40]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/ialloc.h:106:10: warning[-Wanalyzer-malloc-leak]: leak of 'xicalloc(s, 1)'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/xmalloc.c: scope_hint: In function 'xicalloc'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/xmalloc.c: scope_hint: In function 'xicalloc'
#  104|         s = 0;
#  105|       }
#  106|->   return calloc (n, s);
#  107|   }
#  108|   

Error: CPPCHECK_WARNING: [#def41]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/mbscasestr.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def42]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/mbscasestr.c:68:19: warning[deadcode.DeadStores]: Although the value stored to 'table_memory' is used in the enclosing expression, the value is never actually read from 'table_memory'
#   66|     aligned += extra_align;
#   67|     aligned -= (uintptr_t) aligned % alignof (size_t);
#   68|->   size_t *table = table_memory = aligned;
#   69|   
#   70|     /* Fill needle_mbchars.  */

Error: CPPCHECK_WARNING: [#def43]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/mbsrtoc32s.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def44]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/mbsrtowcs.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def45]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/mbsstr.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def46]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/mbsstr.c:67:19: warning[deadcode.DeadStores]: Although the value stored to 'table_memory' is used in the enclosing expression, the value is never actually read from 'table_memory'
#   65|     aligned += extra_align;
#   66|     aligned -= (uintptr_t) aligned % alignof (size_t);
#   67|->   size_t *table = table_memory = aligned;
#   68|   
#   69|     /* Fill needle_mbchars.  */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def47]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/mbuiter.h:164:7: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/mbscasestr.c: scope_hint: In function 'knuth_morris_pratt_multibyte'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/mbscasestr.c:27: included_from: Included from here.
findutils-4.10.0-build/findutils-4.10.0/gl/lib/mbscasestr.c:58:18: note: in expansion of macro 'nmalloca'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/malloca.h:105:37: note: in expansion of macro 'malloca'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/mbscasestr.c:58:18: note: in expansion of macro 'nmalloca'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/malloca.h:105:37: note: in expansion of macro 'malloca'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/mbscasestr.c:58:18: note: in expansion of macro 'nmalloca'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/mbscasestr.c:83:36: note: in expansion of macro 'mbui_avail'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/mbuiter.h:105: included_from: Included from here.
findutils-4.10.0-build/findutils-4.10.0/gl/lib/mbchar.h:336:40: note: in definition of macro 'is_basic'
#  162|     else
#  163|       {
#  164|->       assert (mbsinit (&iter->state));
#  165|         #if !GNULIB_MBRTOC32_REGULAR
#  166|         iter->in_shift = true;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def48]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/mbuiter.h:197:15: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/mbscasestr.c: scope_hint: In function 'knuth_morris_pratt_multibyte'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/mbscasestr.c:58:18: note: in expansion of macro 'nmalloca'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/malloca.h:105:37: note: in expansion of macro 'malloca'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/mbscasestr.c:58:18: note: in expansion of macro 'nmalloca'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/malloca.h:105:37: note: in expansion of macro 'malloca'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/mbscasestr.c:58:18: note: in expansion of macro 'nmalloca'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/mbscasestr.c:83:36: note: in expansion of macro 'mbui_avail'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/mbchar.h:336:40: note: in definition of macro 'is_basic'
#  195|                 /* A null wide character was encountered.  */
#  196|                 iter->cur.bytes = 1;
#  197|->               assert (*iter->cur.ptr == '\0');
#  198|                 assert (iter->cur.wc == 0);
#  199|               }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def49]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/mbuiter.h:198:15: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/mbscasestr.c: scope_hint: In function 'knuth_morris_pratt_multibyte'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/mbscasestr.c:58:18: note: in expansion of macro 'nmalloca'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/malloca.h:105:37: note: in expansion of macro 'malloca'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/mbscasestr.c:58:18: note: in expansion of macro 'nmalloca'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/malloca.h:105:37: note: in expansion of macro 'malloca'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/mbscasestr.c:58:18: note: in expansion of macro 'nmalloca'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/mbscasestr.c:83:36: note: in expansion of macro 'mbui_avail'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/mbchar.h:336:40: note: in definition of macro 'is_basic'
#  196|                 iter->cur.bytes = 1;
#  197|                 assert (*iter->cur.ptr == '\0');
#  198|->               assert (iter->cur.wc == 0);
#  199|               }
#  200|             #if !GNULIB_MBRTOC32_REGULAR

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

Error: CPPCHECK_WARNING (CWE-562): [#def51]
findutils-4.10.0-build/findutils-4.10.0/gl/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]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/nstrftime.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

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

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

Error: CPPCHECK_WARNING: [#def55]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/quotearg.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-688): [#def56]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/savedir.c: scope_hint: In function 'streamsavedir'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/savedir.c:135:11: warning[-Wanalyzer-null-argument]: use of NULL 'name_space' where non-null expected
findutils-4.10.0-build/findutils-4.10.0/build/gl/lib/dirent.h:27: included_from: Included from here.
findutils-4.10.0-build/findutils-4.10.0/gl/lib/savedir.h:29: included_from: Included from here.
findutils-4.10.0-build/findutils-4.10.0/gl/lib/savedir.c:23: included_from: Included from here.
<built-in>: note: argument 1 of '__builtin_memcpy' must be non-null
#  133|                                     entry_size - (allocated - used),
#  134|                                     IDX_MAX - 1, sizeof *name_space);
#  135|->           memcpy (name_space + used, entry, entry_size);
#  136|             if (cmp)
#  137|               {

Error: CLANG_WARNING: [#def57]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/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: [#def58]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/time_rz.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def59]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/time_rz.c: scope_hint: In function 'set_tz'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/time_rz.c:67:47: warning[-Wanalyzer-malloc-leak]: leak of 'tzalloc(getenv("TZ"))'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/time_rz.c:27: included_from: Included from here.
findutils-4.10.0-build/findutils-4.10.0/gl/lib/time_rz.c:29: included_from: Included from here.
#   65|   tzalloc (char const *name)
#   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));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def60]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/time_rz.c:68:64: warning[-Wanalyzer-malloc-leak]: leak of 'tzalloc(getenv("TZ"))'
#   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): [#def61]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/time_rz.c: scope_hint: In function 'mktime_z'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/time_rz.c:210:11: warning[-Wanalyzer-malloc-leak]: leak of 'set_tz(tz)'
#  208|     char *env_tz = getenv_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;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def62]
findutils-4.10.0-build/findutils-4.10.0/gl/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: [#def63]
findutils-4.10.0-build/findutils-4.10.0/gl/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: [#def64]
findutils-4.10.0-build/findutils-4.10.0/gl/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: [#def65]
findutils-4.10.0-build/findutils-4.10.0/gl/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: [#def66]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/vasnprintf.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def67]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/xmalloc.c: scope_hint: In function 'xmalloc'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/xmalloc.c:45:10: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(n)'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/xmalloc.c:22: included_from: Included from here.
findutils-4.10.0-build/findutils-4.10.0/gl/lib/xmalloc.c:57:10: note: in expansion of macro 'XNMALLOC'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/xmalloc.c:57:10: note: in expansion of macro 'XNMALLOC'
findutils-4.10.0-build/findutils-4.10.0/gl/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): [#def68]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/xmalloc.c:45:10: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(s)'
findutils-4.10.0-build/findutils-4.10.0/gl/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): [#def69]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/xmalloc.c: scope_hint: In function 'xcalloc'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/xmalloc.c:298:10: warning[-Wanalyzer-malloc-leak]: leak of 'xcalloc(s, 1)'
findutils-4.10.0-build/findutils-4.10.0/gl/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): [#def70]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/xmalloc.c: scope_hint: In function 'xmemdup'
findutils-4.10.0-build/findutils-4.10.0/gl/lib/xmalloc.c:314:10: warning[-Wanalyzer-malloc-leak]: leak of 'xmemdup(string,  strlen(string) + 1)'
findutils-4.10.0-build/findutils-4.10.0/gl/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: [#def71]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/xstrtol.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def72]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/xstrtoul.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def73]
findutils-4.10.0-build/findutils-4.10.0/gl/lib/xstrtoumax.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def75]
findutils-4.10.0-build/findutils-4.10.0/gnulib-tests/localename.c:39: included_from: Included from here.
findutils-4.10.0-build/findutils-4.10.0/gnulib-tests/struniq.h: scope_hint: In function 'struniq'
findutils-4.10.0-build/findutils-4.10.0/gnulib-tests/struniq.h:118:10: warning[-Wanalyzer-malloc-leak]: leak of 'new_node'
#  116|       if (mt) gl_lock_unlock (struniq_lock);
#  117|     }
#  118|->   return new_node->contents;
#  119|   }

Error: CPPCHECK_WARNING: [#def76]
findutils-4.10.0-build/findutils-4.10.0/gnulib-tests/tempname.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def77]
findutils-4.10.0-build/findutils-4.10.0/gnulib-tests/tmpdir.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

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

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

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

Error: CLANG_WARNING: [#def81]
findutils-4.10.0-build/findutils-4.10.0/lib/listfile.c:202:11: warning[deadcode.DeadStores]: Value stored to 'output_good' is never read
#  200|         if (EOF == putc(' ', stream))
#  201|           {
#  202|->           output_good = false;
#  203|             failed_at = 250;
#  204|           }

Error: CPPCHECK_WARNING: [#def82]
findutils-4.10.0-build/findutils-4.10.0/xargs/xargs.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-476): [#def83]
findutils-4.10.0-build/findutils-4.10.0/xargs/xargs.c:260: warning[nullPointer]: Possible null pointer dereference: p
#  258|     errno = 0;
#  259|     endp = NULL;
#  260|->   val = strtoul (p, &endp, base);
#  261|   
#  262|     /* This if condition is carefully constructed to do

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-126.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namefindutils-4.10.0-2.fc41
store-results-to/tmp/tmpoh10i4tx/findutils-4.10.0-2.fc41.tar.xz
time-created2024-07-03 12:40:30
time-finished2024-07-03 12:42:49
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpoh10i4tx/findutils-4.10.0-2.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpoh10i4tx/findutils-4.10.0-2.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9