Task #162 - man-db-2.12.0-6.fc40/scan-results.err
back to task #162download
Error: SHELLCHECK_WARNING (CWE-569): /etc/cron.daily/man-db.cron:22:15: warning[SC2064]: Use single quotes, otherwise this expands now rather than when signalled. # 20| [[ -f $LOCKFILE ]] && exit 0 # 21| # 22|-> trap "{ rm -f $LOCKFILE ; exit 0; }" EXIT # 23| touch $LOCKFILE # 24| # create/update the mandb database Error: GCC_ANALYZER_WARNING (CWE-122): man-db-2.12.0/gl/lib/argp-help.c: scope_hint: In function 'make_hol' man-db-2.12.0/gl/lib/argp-help.c:491:22: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow man-db-2.12.0/gl/lib/argp-help.c:63: included_from: Included from here. man-db-2.12.0/gl/lib/argp-help.c:1858:1: note: in expansion of macro '__argp_state_help' man-db-2.12.0/gl/lib/argp-help.c:1696:3: note: in expansion of macro '__flockfile' man-db-2.12.0/gl/lib/argp-help.c:33: included_from: Included from here. man-db-2.12.0/gl/lib/argp-help.c:469:17: note: in expansion of macro 'oalias' man-db-2.12.0/gl/lib/argp-help.c:284:19: note: in expansion of macro '__option_is_end' man-db-2.12.0/gl/lib/argp-help.c:472:24: note: in expansion of macro 'oend' /usr/include/features.h:511: included_from: Included from here. /usr/include/assert.h:35: included_from: Included from here. man-db-2.12.0/config.h:3015: included_from: Included from here. man-db-2.12.0/gl/lib/argp-help.c:24: included_from: Included from here. man-db-2.12.0/gl/lib/argp.h:627:8: note: in expansion of macro '__option_is_end' man-db-2.12.0/gl/lib/argp-help.c:61: included_from: Included from here. man-db-2.12.0/gl/lib/argp-help.c:284:19: note: in expansion of macro '__option_is_end' man-db-2.12.0/gl/lib/argp-help.c:472:24: note: in expansion of macro 'oend' man-db-2.12.0/gl/lib/argp-help.c:491:22: note: write of 8 bytes to beyond the end of the region # 489| for (o = opts, entry = hol->entries; ! oend (o); entry++) # 490| { # 491|-> entry->opt = o; # 492| entry->num = 0; # 493| entry->short_options = so; Error: GCC_ANALYZER_WARNING (CWE-122): man-db-2.12.0/gl/lib/argp-help.c:492:22: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow man-db-2.12.0/gl/lib/argp-help.c:1858:1: note: in expansion of macro '__argp_state_help' man-db-2.12.0/gl/lib/argp-help.c:1696:3: note: in expansion of macro '__flockfile' man-db-2.12.0/gl/lib/argp-help.c:469:17: note: in expansion of macro 'oalias' man-db-2.12.0/gl/lib/argp-help.c:284:19: note: in expansion of macro '__option_is_end' man-db-2.12.0/gl/lib/argp-help.c:472:24: note: in expansion of macro 'oend' man-db-2.12.0/gl/lib/argp.h:627:8: note: in expansion of macro '__option_is_end' man-db-2.12.0/gl/lib/argp-help.c:284:19: note: in expansion of macro '__option_is_end' man-db-2.12.0/gl/lib/argp-help.c:472:24: note: in expansion of macro 'oend' man-db-2.12.0/gl/lib/argp-help.c:492:22: note: write of 4 bytes to beyond the end of the region # 490| { # 491| entry->opt = o; # 492|-> entry->num = 0; # 493| entry->short_options = so; # 494| entry->group = cur_group = Error: GCC_ANALYZER_WARNING (CWE-122): man-db-2.12.0/gl/lib/argp-help.c:493:32: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow man-db-2.12.0/gl/lib/argp-help.c:1858:1: note: in expansion of macro '__argp_state_help' man-db-2.12.0/gl/lib/argp-help.c:1696:3: note: in expansion of macro '__flockfile' man-db-2.12.0/gl/lib/argp-help.c:469:17: note: in expansion of macro 'oalias' man-db-2.12.0/gl/lib/argp-help.c:284:19: note: in expansion of macro '__option_is_end' man-db-2.12.0/gl/lib/argp-help.c:472:24: note: in expansion of macro 'oend' man-db-2.12.0/gl/lib/argp.h:627:8: note: in expansion of macro '__option_is_end' man-db-2.12.0/gl/lib/argp-help.c:284:19: note: in expansion of macro '__option_is_end' man-db-2.12.0/gl/lib/argp-help.c:472:24: note: in expansion of macro 'oend' man-db-2.12.0/gl/lib/argp-help.c:493:32: note: write of 8 bytes to beyond the end of the region # 491| entry->opt = o; # 492| entry->num = 0; # 493|-> entry->short_options = so; # 494| entry->group = cur_group = # 495| o->group Error: CLANG_WARNING: man-db-2.12.0/gl/lib/argp-help.c:655:3: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 653| hol_find_entry (struct hol *hol, const char *name) # 654| { # 655|-> struct hol_entry *entry = hol->entries; # 656| unsigned num_entries = hol->num_entries; # 657| Error: GCC_ANALYZER_WARNING (CWE-457): man-db-2.12.0/gl/lib/argp-help.c: scope_hint: In function 'hol_find_entry' man-db-2.12.0/gl/lib/argp-help.c:655:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*hol.entries' man-db-2.12.0/gl/lib/argp-help.c:1858:1: note: in expansion of macro '__argp_state_help' man-db-2.12.0/gl/lib/argp-help.c:1696:3: note: in expansion of macro '__flockfile' man-db-2.12.0/gl/lib/argp-help.c: scope_hint: In function 'hol_find_entry' # 653| hol_find_entry (struct hol *hol, const char *name) # 654| { # 655|-> struct hol_entry *entry = hol->entries; # 656| unsigned num_entries = hol->num_entries; # 657| Error: GCC_ANALYZER_WARNING (CWE-457): man-db-2.12.0/gl/lib/argp-help.c:660:33: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*entry.opt' man-db-2.12.0/gl/lib/argp-help.c:1858:1: note: in expansion of macro '__argp_state_help' man-db-2.12.0/gl/lib/argp-help.c:1696:3: note: in expansion of macro '__flockfile' man-db-2.12.0/gl/lib/argp-help.c:469:17: note: in expansion of macro 'oalias' man-db-2.12.0/gl/lib/argp-help.c:474:17: note: in expansion of macro 'oalias' man-db-2.12.0/gl/lib/argp-help.c: scope_hint: In function 'hol_find_entry' # 658| while (num_entries-- > 0) # 659| { # 660|-> const struct argp_option *opt = entry->opt; # 661| unsigned num_opts = entry->num; # 662| Error: CPPCHECK_WARNING (CWE-476): man-db-2.12.0/gl/lib/argp-help.c:1041: error[ctunullpointer]: Null pointer dereference: argp # 1039| argp_hol (const struct argp *argp, struct hol_cluster *cluster) # 1040| { # 1041|-> const struct argp_child *child = argp->children; # 1042| struct hol *hol = make_hol (argp, cluster); # 1043| if (child) Error: CLANG_WARNING: man-db-2.12.0/gl/lib/argp-help.c:1472:7: warning[core.NullDereference]: Access to field 'num_entries' results in a dereference of a null pointer (loaded from variable 'hol') # 1470| hol_usage (struct hol *hol, argp_fmtstream_t stream) # 1471| { # 1472|-> if (hol->num_entries > 0) # 1473| { # 1474| unsigned nentries; Error: CLANG_WARNING: man-db-2.12.0/gl/lib/argp-help.c:1753:19: warning[core.NullDereference]: Access to field 'num_entries' results in a dereference of a null pointer (loaded from variable 'hol') # 1751| /* Just show where the options go. */ # 1752| { # 1753|-> if (hol->num_entries > 0) # 1754| __argp_fmtstream_puts (fs, dgettext (ARGP_TEXT_DOMAIN, # 1755| " [OPTION...]")); Error: CLANG_WARNING: man-db-2.12.0/gl/lib/argp-help.c:1792:11: warning[core.NullDereference]: Access to field 'num_entries' results in a dereference of a null pointer (loaded from variable 'hol') # 1790| { # 1791| /* Print info about all the options. */ # 1792|-> if (hol->num_entries > 0) # 1793| { # 1794| if (anything) Error: CLANG_WARNING: man-db-2.12.0/gl/lib/argp-help.c:1812:7: warning[deadcode.DeadStores]: Value stored to 'anything' is never read # 1810| "Report bugs to %s.\n"), # 1811| argp_program_bug_address); # 1812|-> anything = 1; # 1813| } # 1814| Error: CLANG_WARNING: man-db-2.12.0/gl/lib/argp-parse.c:816:13: warning[unix.Malloc]: Potential memory leak # 814| &parser->opt_data); # 815| else # 816|-> opt = _getopt_long_r (parser->state.argc, parser->state.argv, # 817| parser->short_opts, parser->long_opts, 0, # 818| &parser->opt_data); Error: CLANG_WARNING: man-db-2.12.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: GCC_ANALYZER_WARNING (CWE-401): man-db-2.12.0/gl/lib/file-set.c: scope_hint: In function 'record_file' man-db-2.12.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): man-db-2.12.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: CPPCHECK_WARNING (CWE-457): man-db-2.12.0/gl/lib/gl_anylinked_list2.h:952: error[uninitvar]: Uninitialized variables: result.count, result.i, result.j # 950| #endif # 951| # 952|-> return result; # 953| } # 954| Error: GCC_ANALYZER_WARNING (CWE-457): man-db-2.12.0/gl/lib/gl_linkedhash_list.c:77: included_from: Included from here. man-db-2.12.0/gl/lib/gl_anylinked_list2.h: scope_hint: In function 'gl_linked_iterator' man-db-2.12.0/gl/lib/gl_anylinked_list2.h:952:10: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'result.count' # 950| #endif # 951| # 952|-> return result; # 953| } # 954| Error: CPPCHECK_WARNING (CWE-457): man-db-2.12.0/gl/lib/gl_anylinked_list2.h:1023: warning[uninitvar]: Uninitialized variables: result.count, result.i, result.j # 1021| #endif # 1022| # 1023|-> return result; # 1024| } # 1025| Error: GCC_ANALYZER_WARNING (CWE-457): man-db-2.12.0/gl/lib/gl_anylinked_list2.h: scope_hint: In function 'gl_linked_iterator_from_to' man-db-2.12.0/gl/lib/gl_anylinked_list2.h:1023:10: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'result.count' # 1021| #endif # 1022| # 1023|-> return result; # 1024| } # 1025| Error: CPPCHECK_WARNING (CWE-457): man-db-2.12.0/gl/lib/gl_anytree_list2.h:603: error[uninitvar]: Uninitialized variables: result.count, result.i, result.j # 601| #endif # 602| # 603|-> return result; # 604| } # 605| Error: GCC_ANALYZER_WARNING (CWE-457): man-db-2.12.0/gl/lib/gl_rbtree_list.c:37: included_from: Included from here. man-db-2.12.0/gl/lib/gl_anytree_list2.h: scope_hint: In function 'gl_tree_iterator' man-db-2.12.0/gl/lib/gl_anytree_list2.h:603:10: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'result.count' # 601| #endif # 602| # 603|-> return result; # 604| } # 605| Error: CPPCHECK_WARNING (CWE-457): man-db-2.12.0/gl/lib/gl_anytree_list2.h:627: warning[uninitvar]: Uninitialized variables: result.count, result.i, result.j # 625| #endif # 626| # 627|-> return result; # 628| } # 629| Error: GCC_ANALYZER_WARNING (CWE-457): man-db-2.12.0/gl/lib/gl_anytree_list2.h: scope_hint: In function 'gl_tree_iterator_from_to' man-db-2.12.0/gl/lib/gl_anytree_list2.h:627:10: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'result.count' # 625| #endif # 626| # 627|-> return result; # 628| } # 629| Error: CPPCHECK_WARNING (CWE-457): man-db-2.12.0/gl/lib/gl_array_list.c:477: error[uninitvar]: Uninitialized variables: result.i, result.j # 475| #endif # 476| # 477|-> return result; # 478| } # 479| Error: GCC_ANALYZER_WARNING (CWE-457): man-db-2.12.0/gl/lib/gl_array_list.c: scope_hint: In function 'gl_array_iterator' man-db-2.12.0/gl/lib/gl_array_list.c:477:10: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'result.i' # 475| #endif # 476| # 477|-> return result; # 478| } # 479| Error: CPPCHECK_WARNING (CWE-457): man-db-2.12.0/gl/lib/gl_array_list.c:498: warning[uninitvar]: Uninitialized variables: result.i, result.j # 496| #endif # 497| # 498|-> return result; # 499| } # 500| Error: GCC_ANALYZER_WARNING (CWE-457): man-db-2.12.0/gl/lib/gl_array_list.c: scope_hint: In function 'gl_array_iterator_from_to' man-db-2.12.0/gl/lib/gl_array_list.c:498:10: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'result.i' # 496| #endif # 497| # 498|-> return result; # 499| } # 500| Error: CPPCHECK_WARNING (CWE-457): man-db-2.12.0/gl/lib/gl_hash_map.c:271: error[uninitvar]: Uninitialized variables: result.count, result.q # 269| #endif # 270| # 271|-> return result; # 272| } # 273| Error: GCC_ANALYZER_WARNING (CWE-457): man-db-2.12.0/gl/lib/gl_hash_map.c: scope_hint: In function 'gl_hash_iterator' man-db-2.12.0/gl/lib/gl_hash_map.c:271:10: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'result.count' # 269| #endif # 270| # 271|-> return result; # 272| } # 273| Error: CPPCHECK_WARNING (CWE-457): man-db-2.12.0/gl/lib/gl_hash_set.c:254: error[uninitvar]: Uninitialized variables: result.count, result.q # 252| #endif # 253| # 254|-> return result; # 255| } # 256| Error: GCC_ANALYZER_WARNING (CWE-457): man-db-2.12.0/gl/lib/gl_hash_set.c: scope_hint: In function 'gl_hash_iterator' man-db-2.12.0/gl/lib/gl_hash_set.c:254:10: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'result.count' # 252| #endif # 253| # 254|-> return result; # 255| } # 256| Error: CLANG_WARNING: man-db-2.12.0/src/whatis.c:59: included_from: Included from here. man-db-2.12.0/gl/lib/gl_hash_set.h:21: included_from: Included from here. man-db-2.12.0/gl/lib/gl_set.h:238:10: warning[core.NullDereference]: Access to field 'vtable' results in a dereference of a null pointer (loaded from variable 'set') # 236| gl_set_search (gl_set_t set, const void *elt) # 237| { # 238|-> return ((const struct gl_set_impl_base *) set)->vtable->search (set, elt); # 239| } # 240| Error: CLANG_WARNING: man-db-2.12.0/gl/lib/gl_set.h:256:3: warning[core.NullDereference]: Access to field 'vtable' results in a dereference of a null pointer (loaded from variable 'set') # 254| gl_set_free (gl_set_t set) # 255| { # 256|-> ((const struct gl_set_impl_base *) set)->vtable->set_free (set); # 257| } # 258| Error: GCC_ANALYZER_WARNING (CWE-401): man-db-2.12.0/gl/lib/ialloc.h:57:37: warning[-Wanalyzer-malloc-leak]: leak of 'ximalloc(s + 1)' man-db-2.12.0/gl/lib/xmalloc.c: scope_hint: In function 'ximalloc' man-db-2.12.0/gl/lib/xmalloc.c: scope_hint: In function 'ximalloc' # 55| imalloc (idx_t s) # 56| { # 57|-> return s <= SIZE_MAX ? malloc (s) : _gl_alloc_nomem (); # 58| } # 59| Error: GCC_ANALYZER_WARNING (CWE-401): man-db-2.12.0/gl/lib/ialloc.h:57:37: warning[-Wanalyzer-malloc-leak]: leak of 'ximalloc(s)' man-db-2.12.0/gl/lib/xmalloc.c: scope_hint: In function 'ximalloc' man-db-2.12.0/gl/lib/xmalloc.c: scope_hint: In function 'ximalloc' # 55| imalloc (idx_t s) # 56| { # 57|-> return s <= SIZE_MAX ? malloc (s) : _gl_alloc_nomem (); # 58| } # 59| Error: GCC_ANALYZER_WARNING (CWE-401): man-db-2.12.0/gl/lib/ialloc.h:93:10: warning[-Wanalyzer-malloc-leak]: leak of 'xicalloc(s, 1)' man-db-2.12.0/gl/lib/xmalloc.c: scope_hint: In function 'xicalloc' man-db-2.12.0/gl/lib/xmalloc.c: scope_hint: In function 'xicalloc' # 91| s = 0; # 92| } # 93|-> return calloc (n, s); # 94| } # 95| Error: GCC_ANALYZER_WARNING (CWE-775): man-db-2.12.0/gl/lib/stdopen.c: scope_hint: In function 'stdopen' man-db-2.12.0/gl/lib/stdopen.c:55:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor '<unknown>' man-db-2.12.0/gl/lib/stdopen.c:25: included_from: Included from here. # 53| if (new_fd < 0) # 54| return errno; # 55|-> if (STDERR_FILENO < new_fd) # 56| { # 57| /* 0, 1, and 2 are already open somehow. Error: GCC_ANALYZER_WARNING (CWE-401): man-db-2.12.0/gl/lib/xmalloc.c: scope_hint: In function 'xmalloc' man-db-2.12.0/gl/lib/xmalloc.c:45:10: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(n)' man-db-2.12.0/gl/lib/xmalloc.c:22: included_from: Included from here. man-db-2.12.0/gl/lib/xmalloc.c:57:10: note: in expansion of macro 'XNMALLOC' man-db-2.12.0/gl/lib/xmalloc.c:57:10: note: in expansion of macro 'XNMALLOC' man-db-2.12.0/gl/lib/xmalloc.c: scope_hint: In function 'xmalloc' # 43| xmalloc (size_t s) # 44| { # 45|-> return nonnull (malloc (s)); # 46| } # 47| Error: GCC_ANALYZER_WARNING (CWE-401): man-db-2.12.0/gl/lib/xmalloc.c:45:10: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(s)' man-db-2.12.0/gl/lib/xmalloc.c: scope_hint: In function 'xmalloc' # 43| xmalloc (size_t s) # 44| { # 45|-> return nonnull (malloc (s)); # 46| } # 47| Error: GCC_ANALYZER_WARNING (CWE-401): man-db-2.12.0/gl/lib/xmalloc.c: scope_hint: In function 'xcalloc' man-db-2.12.0/gl/lib/xmalloc.c:298:10: warning[-Wanalyzer-malloc-leak]: leak of 'xcalloc(s, 1)' man-db-2.12.0/gl/lib/xmalloc.c: scope_hint: In function 'xcalloc' # 296| xcalloc (size_t n, size_t s) # 297| { # 298|-> return nonnull (calloc (n, s)); # 299| } # 300| Error: GCC_ANALYZER_WARNING (CWE-401): man-db-2.12.0/gl/lib/xmalloc.c: scope_hint: In function 'xmemdup' man-db-2.12.0/gl/lib/xmalloc.c:314:10: warning[-Wanalyzer-malloc-leak]: leak of 'xmemdup(string, strlen(string) + 1)' man-db-2.12.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: COMPILER_WARNING (CWE-1164): man-db-2.12.0/lib/security.c: scope_hint: At top level man-db-2.12.0/lib/security.c:41:9: warning[-Wunused-macros]: macro "_" is not used # 41 | #define _(String) gettext (String) # | ^ # 39| #include "error.h" # 40| #include "gettext.h" # 41|-> #define _(String) gettext (String) # 42| # 43| #include "manconfig.h" Error: COMPILER_WARNING: man-db-2.12.0/lib/security.c: scope_hint: In function 'running_setuid' man-db-2.12.0/lib/security.c:99:21: warning[-Wsuggest-attribute=const]: function might be candidate for attribute 'const' # 99 | bool ATTRIBUTE_PURE running_setuid (void) # | ^~~~~~~~~~~~~~ # 97| } # 98| # 99|-> bool ATTRIBUTE_PURE running_setuid (void) # 100| { # 101| #ifdef MAN_OWNER Error: CLANG_WARNING: man-db-2.12.0/src/man.c:2840:8: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 2838| /* name is never NULL here, see add_candidate() */ # 2839| if (STREQ (lsource->name, left->req_name)) { # 2840|-> if (!STREQ (rsource->name, right->req_name)) # 2841| return -1; # 2842| } else { Error: CLANG_WARNING: man-db-2.12.0/src/man.c:2843:7: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 2841| return -1; # 2842| } else { # 2843|-> if (STREQ (rsource->name, right->req_name)) # 2844| return 1; # 2845| } Error: COMPILER_WARNING: man-db-2.12.0/src/manp.c:501:7: warning[-Wsuggest-attribute=malloc]: function might be candidate for attribute ‘malloc’ # 501 | char *add_nls_manpaths (const char *manpathlist, const char *locales) # | ^~~~~~~~~~~~~~~~ # 499| } # 500| # 501|-> char *add_nls_manpaths (const char *manpathlist, const char *locales) # 502| { # 503| char *manpath = NULL; Error: CPPCHECK_WARNING (CWE-476): man-db-2.12.0/src/zsoelim.c:1940: warning[nullPointer]: Possible null pointer dereference: b # 1938| yy_flush_buffer( b ); # 1939| # 1940|-> b->yy_input_file = file; # 1941| b->yy_fill_buffer = 1; # 1942| Error: CPPCHECK_WARNING (CWE-476): man-db-2.12.0/src/zsoelim.c:1941: warning[nullPointer]: Possible null pointer dereference: b # 1939| # 1940| b->yy_input_file = file; # 1941|-> b->yy_fill_buffer = 1; # 1942| # 1943| /* If b is the current buffer, then yy_init_buffer was _probably_