Task #126 - man-db-2.12.1-1.fc41/scan-results.err
back to task #126download
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.1/gl/lib/argp-help.c: scope_hint: In function 'make_hol' man-db-2.12.1/gl/lib/argp-help.c:491:22: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow man-db-2.12.1/gl/lib/argp-help.c:63: included_from: Included from here. man-db-2.12.1/gl/lib/argp-help.c:1863:1: note: in expansion of macro '__argp_state_help' man-db-2.12.1/gl/lib/argp-help.c:1701:3: note: in expansion of macro '__flockfile' man-db-2.12.1/gl/lib/argp-help.c:33: included_from: Included from here. man-db-2.12.1/gl/lib/argp-help.c:469:17: note: in expansion of macro 'oalias' man-db-2.12.1/gl/lib/argp-help.c:284:19: note: in expansion of macro '__option_is_end' man-db-2.12.1/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.1/config.h:3162: included_from: Included from here. man-db-2.12.1/gl/lib/argp-help.c:24: included_from: Included from here. man-db-2.12.1/gl/lib/argp.h:627:8: note: in expansion of macro '__option_is_end' man-db-2.12.1/gl/lib/argp-help.c:61: included_from: Included from here. man-db-2.12.1/gl/lib/argp-help.c:284:19: note: in expansion of macro '__option_is_end' man-db-2.12.1/gl/lib/argp-help.c:472:24: note: in expansion of macro 'oend' man-db-2.12.1/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.1/gl/lib/argp-help.c:492:22: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow man-db-2.12.1/gl/lib/argp-help.c:1863:1: note: in expansion of macro '__argp_state_help' man-db-2.12.1/gl/lib/argp-help.c:1701:3: note: in expansion of macro '__flockfile' man-db-2.12.1/gl/lib/argp-help.c:469:17: note: in expansion of macro 'oalias' man-db-2.12.1/gl/lib/argp-help.c:284:19: note: in expansion of macro '__option_is_end' man-db-2.12.1/gl/lib/argp-help.c:472:24: note: in expansion of macro 'oend' man-db-2.12.1/gl/lib/argp.h:627:8: note: in expansion of macro '__option_is_end' man-db-2.12.1/gl/lib/argp-help.c:284:19: note: in expansion of macro '__option_is_end' man-db-2.12.1/gl/lib/argp-help.c:472:24: note: in expansion of macro 'oend' man-db-2.12.1/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.1/gl/lib/argp-help.c:493:32: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow man-db-2.12.1/gl/lib/argp-help.c:1863:1: note: in expansion of macro '__argp_state_help' man-db-2.12.1/gl/lib/argp-help.c:1701:3: note: in expansion of macro '__flockfile' man-db-2.12.1/gl/lib/argp-help.c:469:17: note: in expansion of macro 'oalias' man-db-2.12.1/gl/lib/argp-help.c:284:19: note: in expansion of macro '__option_is_end' man-db-2.12.1/gl/lib/argp-help.c:472:24: note: in expansion of macro 'oend' man-db-2.12.1/gl/lib/argp.h:627:8: note: in expansion of macro '__option_is_end' man-db-2.12.1/gl/lib/argp-help.c:284:19: note: in expansion of macro '__option_is_end' man-db-2.12.1/gl/lib/argp-help.c:472:24: note: in expansion of macro 'oend' man-db-2.12.1/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: GCC_ANALYZER_WARNING (CWE-457): man-db-2.12.1/gl/lib/argp-help.c: scope_hint: In function 'hol_find_entry' man-db-2.12.1/gl/lib/argp-help.c:663:37: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*entry.opt' man-db-2.12.1/gl/lib/argp-help.c:1863:1: note: in expansion of macro '__argp_state_help' man-db-2.12.1/gl/lib/argp-help.c:1701:3: note: in expansion of macro '__flockfile' man-db-2.12.1/gl/lib/argp-help.c:469:17: note: in expansion of macro 'oalias' man-db-2.12.1/gl/lib/argp-help.c:474:17: note: in expansion of macro 'oalias' man-db-2.12.1/gl/lib/argp-help.c: scope_hint: In function 'hol_find_entry' # 661| do # 662| { # 663|-> const struct argp_option *opt = entry->opt; # 664| unsigned num_opts = entry->num; # 665| Error: CPPCHECK_WARNING (CWE-476): man-db-2.12.1/gl/lib/argp-help.c:1046: error[ctunullpointer]: Null pointer dereference: argp # 1044| argp_hol (const struct argp *argp, struct hol_cluster *cluster) # 1045| { # 1046|-> const struct argp_child *child = argp->children; # 1047| struct hol *hol = make_hol (argp, cluster); # 1048| if (child) Error: CLANG_WARNING: man-db-2.12.1/gl/lib/argp-help.c:1477:7: warning[core.NullDereference]: Access to field 'num_entries' results in a dereference of a null pointer (loaded from variable 'hol') # 1475| hol_usage (struct hol *hol, argp_fmtstream_t stream) # 1476| { # 1477|-> if (hol->num_entries > 0) # 1478| { # 1479| unsigned nentries; Error: CLANG_WARNING: man-db-2.12.1/gl/lib/argp-help.c:1758:19: warning[core.NullDereference]: Access to field 'num_entries' results in a dereference of a null pointer (loaded from variable 'hol') # 1756| /* Just show where the options go. */ # 1757| { # 1758|-> if (hol->num_entries > 0) # 1759| __argp_fmtstream_puts (fs, dgettext (ARGP_TEXT_DOMAIN, # 1760| " [OPTION...]")); Error: CLANG_WARNING: man-db-2.12.1/gl/lib/argp-help.c:1797:11: warning[core.NullDereference]: Access to field 'num_entries' results in a dereference of a null pointer (loaded from variable 'hol') # 1795| { # 1796| /* Print info about all the options. */ # 1797|-> if (hol->num_entries > 0) # 1798| { # 1799| if (anything) Error: CLANG_WARNING: man-db-2.12.1/gl/lib/argp-help.c:1817:7: warning[deadcode.DeadStores]: Value stored to 'anything' is never read # 1815| "Report bugs to %s.\n"), # 1816| argp_program_bug_address); # 1817|-> anything = 1; # 1818| } # 1819| Error: CLANG_WARNING: man-db-2.12.1/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.1/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.1/gl/lib/file-set.c: scope_hint: In function 'record_file' man-db-2.12.1/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.1/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-758): man-db-2.12.1/gl/lib/getopt.c:272: warning[objectIndex]: The address of local variable 'ambig_fallback' might be accessed at non-zero index. # 270| } # 271| if (ambig_set && ambig_set != &ambig_fallback) # 272|-> ambig_set[option_index] = 1; # 273| } # 274| } Error: CPPCHECK_WARNING (CWE-457): man-db-2.12.1/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.1/gl/lib/gl_linkedhash_list.c:77: included_from: Included from here. man-db-2.12.1/gl/lib/gl_anylinked_list2.h: scope_hint: In function 'gl_linked_iterator' man-db-2.12.1/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.1/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.1/gl/lib/gl_anylinked_list2.h: scope_hint: In function 'gl_linked_iterator_from_to' man-db-2.12.1/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.1/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.1/gl/lib/gl_rbtree_list.c:37: included_from: Included from here. man-db-2.12.1/gl/lib/gl_anytree_list2.h: scope_hint: In function 'gl_tree_iterator' man-db-2.12.1/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.1/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.1/gl/lib/gl_anytree_list2.h: scope_hint: In function 'gl_tree_iterator_from_to' man-db-2.12.1/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.1/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.1/gl/lib/gl_array_list.c: scope_hint: In function 'gl_array_iterator' man-db-2.12.1/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.1/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.1/gl/lib/gl_array_list.c: scope_hint: In function 'gl_array_iterator_from_to' man-db-2.12.1/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.1/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.1/gl/lib/gl_hash_map.c: scope_hint: In function 'gl_hash_iterator' man-db-2.12.1/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.1/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.1/gl/lib/gl_hash_set.c: scope_hint: In function 'gl_hash_iterator' man-db-2.12.1/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.1/src/whatis.c:59: included_from: Included from here. man-db-2.12.1/gl/lib/gl_hash_set.h:21: included_from: Included from here. man-db-2.12.1/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.1/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.1/gl/lib/ialloc.h:60:37: warning[-Wanalyzer-malloc-leak]: leak of 'ximalloc(s + 1)' man-db-2.12.1/gl/lib/xmalloc.c: scope_hint: In function 'ximalloc' man-db-2.12.1/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): man-db-2.12.1/gl/lib/ialloc.h:60:37: warning[-Wanalyzer-malloc-leak]: leak of 'ximalloc(s)' man-db-2.12.1/gl/lib/xmalloc.c: scope_hint: In function 'ximalloc' man-db-2.12.1/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): man-db-2.12.1/gl/lib/ialloc.h:106:10: warning[-Wanalyzer-malloc-leak]: leak of 'xicalloc(s, 1)' man-db-2.12.1/gl/lib/xmalloc.c: scope_hint: In function 'xicalloc' man-db-2.12.1/gl/lib/xmalloc.c: scope_hint: In function 'xicalloc' # 104| s = 0; # 105| } # 106|-> return calloc (n, s); # 107| } # 108| Error: GCC_ANALYZER_WARNING (CWE-775): man-db-2.12.1/gl/lib/stdopen.c: scope_hint: In function 'stdopen' man-db-2.12.1/gl/lib/stdopen.c:55:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor '<unknown>' man-db-2.12.1/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.1/gl/lib/xmalloc.c: scope_hint: In function 'xmalloc' man-db-2.12.1/gl/lib/xmalloc.c:45:10: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(n)' man-db-2.12.1/gl/lib/xmalloc.c:22: included_from: Included from here. man-db-2.12.1/gl/lib/xmalloc.c:57:10: note: in expansion of macro 'XNMALLOC' man-db-2.12.1/gl/lib/xmalloc.c:57:10: note: in expansion of macro 'XNMALLOC' man-db-2.12.1/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.1/gl/lib/xmalloc.c:45:10: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(s)' man-db-2.12.1/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.1/gl/lib/xmalloc.c: scope_hint: In function 'xcalloc' man-db-2.12.1/gl/lib/xmalloc.c:298:10: warning[-Wanalyzer-malloc-leak]: leak of 'xcalloc(s, 1)' man-db-2.12.1/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.1/gl/lib/xmalloc.c: scope_hint: In function 'xmemdup' man-db-2.12.1/gl/lib/xmalloc.c:314:10: warning[-Wanalyzer-malloc-leak]: leak of 'xmemdup(string, strlen(string) + 1)' man-db-2.12.1/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.1/lib/security.c: scope_hint: At top level man-db-2.12.1/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.1/lib/security.c: scope_hint: In function 'running_setuid' man-db-2.12.1/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.1/src/man.c:2838:8: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 2836| /* name is never NULL here, see add_candidate() */ # 2837| if (STREQ (lsource->name, left->req_name)) { # 2838|-> if (!STREQ (rsource->name, right->req_name)) # 2839| return -1; # 2840| } else { Error: CLANG_WARNING: man-db-2.12.1/src/man.c:2841:7: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 2839| return -1; # 2840| } else { # 2841|-> if (STREQ (rsource->name, right->req_name)) # 2842| return 1; # 2843| } Error: COMPILER_WARNING: man-db-2.12.1/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.1/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.1/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_