Task #1634 - added.err
back to task #1634download
Error: GCC_ANALYZER_WARNING (CWE-476):
dbus-broker-36/src/util/fdlist.c: scope_hint: In function ‘fdlist_new_dup_fds’
dbus-broker-36/src/util/fdlist.c:90:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
dbus-broker-36/src/util/fdlist.c:15: included_from: Included from here.
dbus-broker-36/subprojects/libcstdaux-1/src/c-stdaux-gnuc.h:169:17: note: in expansion of macro ‘ERROR_ORIGIN’
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/src/util/error.h:28:25: note: in expansion of macro ‘C_CC_MACRO1’
dbus-broker-36/src/util/fdlist.c:34:24: note: in expansion of macro ‘error_origin’
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):
dbus-broker-36/src/util/fdlist.c:90:24: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
dbus-broker-36/src/util/fdlist.c: scope_hint: In function ‘fdlist_new_dup_fds’
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:
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:
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):
dbus-broker-36/src/util/fdlist.c:101:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
dbus-broker-36/subprojects/libcstdaux-1/src/c-stdaux-gnuc.h:169:17: note: in expansion of macro ‘ERROR_ORIGIN’
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/src/util/error.h:28:25: note: in expansion of macro ‘C_CC_MACRO1’
dbus-broker-36/src/util/fdlist.c:34:24: note: in expansion of macro ‘error_origin’
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:
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;