Newly introduced defects

List of Defects

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1]
dbus-broker-36-build/dbus-broker-36/src/util/fdlist.c: scope_hint: In function ‘fdlist_new_dup_fds’
dbus-broker-36-build/dbus-broker-36/src/util/fdlist.c:90:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
dbus-broker-36-build/dbus-broker-36/src/util/fdlist.c:15: included_from: Included from here.
dbus-broker-36-build/dbus-broker-36/subprojects/libcstdaux-1/src/c-stdaux-gnuc.h:169:17: note: in expansion of macro ‘ERROR_ORIGIN’
dbus-broker-36-build/dbus-broker-36/subprojects/libcstdaux-1/src/c-stdaux-gnuc.h:165:38: note: in expansion of macro ‘C_INTERNAL_CC_MACRO1’
dbus-broker-36-build/dbus-broker-36/src/util/error.h:28:25: note: in expansion of macro ‘C_CC_MACRO1’
dbus-broker-36-build/dbus-broker-36/src/util/fdlist.c:34:24: note: in expansion of macro ‘error_origin’
dbus-broker-36-build/dbus-broker-36/src/util/fdlist.c: scope_hint: In function ‘fdlist_new_dup_fds’
#   88|           p = fdlist_data(list);
#   89|           for (i = 0; i < n_fds; ++i) {
#   90|->                 p[i] = fcntl(p[i], F_DUPFD_CLOEXEC, 3);
#   91|                   if (p[i] < 0) {
#   92|                           r = -errno;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def2]
dbus-broker-36-build/dbus-broker-36/src/util/fdlist.c:90:24: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
dbus-broker-36-build/dbus-broker-36/src/util/fdlist.c: scope_hint: In function ‘fdlist_new_dup_fds’
dbus-broker-36-build/dbus-broker-36/src/util/fdlist.c: scope_hint: In function ‘fdlist_new_dup_fds’
#   88|           p = fdlist_data(list);
#   89|           for (i = 0; i < n_fds; ++i) {
#   90|->                 p[i] = fcntl(p[i], F_DUPFD_CLOEXEC, 3);
#   91|                   if (p[i] < 0) {
#   92|                           r = -errno;

Error: CLANG_WARNING: [#def3]
dbus-broker-36-build/dbus-broker-36/src/util/fdlist.c:90:24: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value
#   88|           p = fdlist_data(list);
#   89|           for (i = 0; i < n_fds; ++i) {
#   90|->                 p[i] = fcntl(p[i], F_DUPFD_CLOEXEC, 3);
#   91|                   if (p[i] < 0) {
#   92|                           r = -errno;

Error: CLANG_WARNING: [#def4]
dbus-broker-36-build/dbus-broker-36/src/util/fdlist.c:97:45: warning[unix.Malloc]: Potential leak of memory pointed to by 'list'
#   95|                                   p[i] = c_close(p[i]);
#   96|                           }
#   97|->                         return error_origin(r);
#   98|                   }
#   99|           }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def5]
dbus-broker-36-build/dbus-broker-36/src/util/fdlist.c:101:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
dbus-broker-36-build/dbus-broker-36/subprojects/libcstdaux-1/src/c-stdaux-gnuc.h:169:17: note: in expansion of macro ‘ERROR_ORIGIN’
dbus-broker-36-build/dbus-broker-36/subprojects/libcstdaux-1/src/c-stdaux-gnuc.h:165:38: note: in expansion of macro ‘C_INTERNAL_CC_MACRO1’
dbus-broker-36-build/dbus-broker-36/src/util/error.h:28:25: note: in expansion of macro ‘C_CC_MACRO1’
dbus-broker-36-build/dbus-broker-36/src/util/fdlist.c:34:24: note: in expansion of macro ‘error_origin’
dbus-broker-36-build/dbus-broker-36/src/util/fdlist.c: scope_hint: In function ‘fdlist_new_dup_fds’
#   99|           }
#  100|   
#  101|->         list->consumed = true;
#  102|   
#  103|           *listp = list;

Error: CLANG_WARNING: [#def6]
dbus-broker-36-build/dbus-broker-36/src/util/fdlist.c:101:24: warning[core.NullDereference]: Access to field 'consumed' results in a dereference of a null pointer (loaded from variable 'list')
#   99|           }
#  100|   
#  101|->         list->consumed = true;
#  102|   
#  103|           *listp = list;

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
diffbase-analyzer-version-clang18.1.7
diffbase-analyzer-version-cppcheck2.14.2
diffbase-analyzer-version-gcc14.1.1
diffbase-analyzer-version-gcc-analyzer14.1.1
diffbase-analyzer-version-shellcheck0.10.0
diffbase-enabled-pluginsclang, cppcheck, gcc, shellcheck
diffbase-exit-code0
diffbase-hostip-172-16-1-12.us-west-2.compute.internal
diffbase-mock-configfedora-41-x86_64
diffbase-project-namedbus-broker-35-4.fc40
diffbase-store-results-to/tmp/tmpn9ypjxo3/dbus-broker-35-4.fc40.tar.xz
diffbase-time-created2024-07-03 12:16:58
diffbase-time-finished2024-07-03 12:20:07
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpn9ypjxo3/dbus-broker-35-4.fc40.tar.xz' '--gcc-analyze' '/tmp/tmpn9ypjxo3/dbus-broker-35-4.fc40.src.rpm'
diffbase-tool-versioncsmock-3.5.3-1.el9
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-12.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namedbus-broker-36-2.fc41
store-results-to/tmp/tmpqfniev0a/dbus-broker-36-2.fc41.tar.xz
time-created2024-07-03 12:20:23
time-finished2024-07-03 12:23:00
titleNewly introduced defects
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpqfniev0a/dbus-broker-36-2.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpqfniev0a/dbus-broker-36-2.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9