Task #112061 - fixed.err
back to task #112061download
Error: GCC_ANALYZER_WARNING (CWE-476):
binutils-with-gold-2.46/bfd/elfxx-x86.c:1992:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
# 1990| {
# 1991| case SFRAME_PLT:
# 1992|-> ectx = htab->plt_cfe_ctx;
# 1993| sec = htab->plt_sframe;
# 1994| break;
Error: GCC_ANALYZER_WARNING (CWE-476):
binutils-with-gold-2.46/bfd/elfxx-x86.c:1996:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
# 1994| break;
# 1995| case SFRAME_PLT_SEC:
# 1996|-> ectx = htab->plt_second_cfe_ctx;
# 1997| sec = htab->plt_second_sframe;
# 1998| break;
Error: GCC_ANALYZER_WARNING (CWE-476):
binutils-with-gold-2.46/bfd/elfxx-x86.c:2000:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘htab’
# 1998| break;
# 1999| case SFRAME_PLT_GOT:
# 2000|-> ectx = htab->plt_got_cfe_ctx;
# 2001| sec = htab->plt_got_sframe;
# 2002| break;
Error: COMPILER_WARNING (CWE-704):
binutils-with-gold-2.46/binutils/addr2line.c: scope_hint: In function ‘translate_addresses’
binutils-with-gold-2.46/binutils/addr2line.c:390:21: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 390 | h = strrchr (filename, '/');
# | ^
# 388| char *h;
# 389|
# 390|-> h = strrchr (filename, '/');
# 391| if (h != NULL)
# 392| filename = h + 1;
Error: COMPILER_WARNING (CWE-704):
binutils-with-gold-2.46/binutils/addr2line.c:390:21: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 388| char *h;
# 389|
# 390|-> h = strrchr (filename, '/');
# 391| if (h != NULL)
# 392| filename = h + 1;
Error: COMPILER_WARNING (CWE-704):
binutils-with-gold-2.46/binutils/nm.c: scope_hint: In function ‘print_symname’
binutils-with-gold-2.46/binutils/nm.c:689:21: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
# 689 | char *atver = strchr (name, '@');
# | ^~~~~~
# 687| && bfd_get_flavour (abfd) == bfd_target_elf_flavour)
# 688| {
# 689|-> char *atver = strchr (name, '@');
# 690|
# 691| if (atver)
Error: COMPILER_WARNING (CWE-704):
binutils-with-gold-2.46/binutils/nm.c:689:21: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
# 687| && bfd_get_flavour (abfd) == bfd_target_elf_flavour)
# 688| {
# 689|-> char *atver = strchr (name, '@');
# 690|
# 691| if (atver)
Error: COMPILER_WARNING (CWE-704):
binutils-with-gold-2.46/binutils/prdbg.c: scope_hint: In function ‘tg_start_function’
binutils-with-gold-2.46/binutils/prdbg.c:2658:11: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 2658 | sep = strchr (name, '(');
# | ^
# 2656| name = dname;
# 2657| }
# 2658|-> sep = strchr (name, '(');
# 2659| if (sep)
# 2660| *sep = 0;
Error: COMPILER_WARNING (CWE-704):
binutils-with-gold-2.46/binutils/prdbg.c:2658:11: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 2656| name = dname;
# 2657| }
# 2658|-> sep = strchr (name, '(');
# 2659| if (sep)
# 2660| *sep = 0;
Error: CPPCHECK_WARNING (CWE-476):
binutils-with-gold-2.46/binutils/readelf.c:6775: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: section
# 6773| error (_("Out of memory allocating dump request table.\n"));
# 6774|
# 6775|-> new_request->name = strdup (section);
# 6776| if (!new_request->name)
# 6777| error (_("Out of memory allocating dump request table.\n"));
Error: GCC_ANALYZER_WARNING (CWE-401):
binutils-with-gold-2.46/libsframe/sframe.c:2001:1: warning[-Wanalyzer-malloc-leak]: leak of ‘ectx’
binutils-with-gold-2.46/libsframe/sframe.c:1970:1: enter_function: entry to ‘sframe_encode’
binutils-with-gold-2.46/libsframe/sframe.c:1976:6: branch_false: following ‘false’ branch (when ‘ver == 3’)...
binutils-with-gold-2.46/libsframe/sframe.c:1979:15: branch_false: ...to here
binutils-with-gold-2.46/libsframe/sframe.c:1979:15: acquire_memory: allocated here
binutils-with-gold-2.46/libsframe/sframe.c:1979:6: branch_false: following ‘false’ branch (when ‘ectx’ is non-NULL)...
binutils-with-gold-2.46/libsframe/sframe.c:1982:3: branch_false: ...to here
binutils-with-gold-2.46/libsframe/sframe.c:1993:6: branch_true: following ‘true’ branch...
binutils-with-gold-2.46/libsframe/sframe.c:1994:11: call_function: inlined call to ‘sframe_ret_set_errno’ from ‘sframe_encode’
binutils-with-gold-2.46/libsframe/sframe.c:2001:1: danger: ‘ectx’ leaks here; was allocated at [(4)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/3)
# 1999|
# 2000| return ectx;
# 2001|-> }
# 2002|
# 2003| /* Free the encoder context ECTXP. */