Newly introduced defects

List of Defects

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1]
NetworkManager-1.46.0/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c: scope_hint: In function 'make_connection_setting'
NetworkManager-1.46.0/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:607:37: warning[-Wanalyzer-null-dereference]: dereference of NULL '_str_sls'
NetworkManager-1.46.0/src/libnm-std-aux/nm-default-std.h:102: included_from: Included from here.
NetworkManager-1.46.0/src/libnm-glib-aux/nm-default-glib.h:11: included_from: Included from here.
NetworkManager-1.46.0/src/libnm-glib-aux/nm-default-glib-i18n-prog.h:13: included_from: Included from here.
NetworkManager-1.46.0/src/core/nm-default-daemon.h:11: included_from: Included from here.
NetworkManager-1.46.0/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:6: included_from: Included from here.
NetworkManager-1.46.0/src/libnm-std-aux/nm-std-aux.h:202:27: note: in expansion of macro '_NM_BOOLEAN_EXPR_IMPL'
NetworkManager-1.46.0/src/libnm-glib-aux/nm-macros-internal.h:1693:31: note: in expansion of macro 'NM_BOOLEAN_EXPR'
/usr/include/glib-2.0/glib/gmacros.h:1244:43: note: in expansion of macro '_G_BOOLEAN_EXPR'
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro 'G_LIKELY'
NetworkManager-1.46.0/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:6482:5: note: in expansion of macro 'g_return_val_if_fail'
NetworkManager-1.46.0/src/libnm-std-aux/nm-std-aux.h:202:27: note: in expansion of macro '_NM_BOOLEAN_EXPR_IMPL'
NetworkManager-1.46.0/src/libnm-glib-aux/nm-macros-internal.h:1693:31: note: in expansion of macro 'NM_BOOLEAN_EXPR'
/usr/include/glib-2.0/glib/gmacros.h:1244:43: note: in expansion of macro '_G_BOOLEAN_EXPR'
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro 'G_LIKELY'
NetworkManager-1.46.0/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:6483:5: note: in expansion of macro 'g_return_val_if_fail'
NetworkManager-1.46.0/src/libnm-std-aux/nm-std-aux.h:202:27: note: in expansion of macro '_NM_BOOLEAN_EXPR_IMPL'
NetworkManager-1.46.0/src/libnm-glib-aux/nm-macros-internal.h:1693:31: note: in expansion of macro 'NM_BOOLEAN_EXPR'
/usr/include/glib-2.0/glib/gmacros.h:1244:43: note: in expansion of macro '_G_BOOLEAN_EXPR'
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro 'G_LIKELY'
NetworkManager-1.46.0/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:6483:5: note: in expansion of macro 'g_return_val_if_fail'
NetworkManager-1.46.0/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:6485:5: note: in expansion of macro 'NM_SET_OUT'
NetworkManager-1.46.0/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:6485:5: note: in expansion of macro 'NM_SET_OUT'
NetworkManager-1.46.0/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:6390:5: note: in expansion of macro 'nm_assert'
NetworkManager-1.46.0/src/libnm-std-aux/nm-std-aux.h:307:38: note: in definition of macro 'nm_assert'
/usr/include/glib-2.0/gobject/gobject.h:26: included_from: Included from here.
/usr/include/glib-2.0/gobject/gbinding.h:31: included_from: Included from here.
/usr/include/glib-2.0/glib-object.h:24: included_from: Included from here.
/usr/include/glib-2.0/gio/gioenums.h:30: included_from: Included from here.
/usr/include/glib-2.0/gio/giotypes.h:30: included_from: Included from here.
/usr/include/glib-2.0/gio/gio.h:28: included_from: Included from here.
NetworkManager-1.46.0/src/libnm-glib-aux/nm-macros-internal.h:15: included_from: Included from here.
NetworkManager-1.46.0/src/libnm-glib-aux/nm-default-glib.h:66: included_from: Included from here.
/usr/include/glib-2.0/gobject/gtype.h:2656:57: note: in definition of macro '_G_TYPE_CIC'
NetworkManager-1.46.0/src/libnm-core-public/nm-setting-connection.h:20:6: note: in expansion of macro 'G_TYPE_CHECK_INSTANCE_CAST'
NetworkManager-1.46.0/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:404:13: note: in expansion of macro 'NM_SETTING_CONNECTION'
NetworkManager-1.46.0/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:606:22: note: in expansion of macro 'nm_str_skip_leading_spaces'
#  605|               d      = nm_g_ascii_strtod(v, &endptr);
#  606|               endptr = nm_str_skip_leading_spaces(endptr);
#  607|->             if (errno == 0 && endptr[0] == '\0' && d >= 0.0) {
#  608|                   d *= 1000.0;
#  609|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def2]
NetworkManager-1.46.0/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c: scope_hint: In function 'escape_id'
NetworkManager-1.46.0/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c:3336:12: warning[-Wanalyzer-null-dereference]: dereference of NULL 'p'
/usr/include/glib-2.0/glib/gstring.h:37: included_from: Included from here.
/usr/include/glib-2.0/glib/giochannel.h:36: included_from: Included from here.
/usr/include/glib-2.0/glib.h:56: included_from: Included from here.
NetworkManager-1.46.0/src/libnm-glib-aux/nm-default-glib.h:18: included_from: Included from here.
NetworkManager-1.46.0/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c:3332:21: note: in expansion of macro 'g_strdup'
NetworkManager-1.46.0/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c: scope_hint: In function 'escape_id'
# 3334|   
# 3335|       /* Escape random stuff */
# 3336|->     while (*p) {
# 3337|           if (*p == ' ')
# 3338|               *p = '_';

Error: GCC_ANALYZER_WARNING (CWE-688): [#def3]
NetworkManager-1.46.0/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c:19: included_from: Included from here.
NetworkManager-1.46.0/src/libnm-glib-aux/nm-str-buf.h: scope_hint: In function 'nm_str_buf_append_len'
NetworkManager-1.46.0/src/libnm-glib-aux/nm-str-buf.h:256:9: warning[-Wanalyzer-null-argument]: use of NULL 'ifcfg_name_free' where non-null expected
NetworkManager-1.46.0/src/libnm-std-aux/nm-default-std.h:102: included_from: Included from here.
NetworkManager-1.46.0/src/libnm-glib-aux/nm-default-glib.h:11: included_from: Included from here.
NetworkManager-1.46.0/src/libnm-glib-aux/nm-default-glib-i18n-prog.h:13: included_from: Included from here.
NetworkManager-1.46.0/src/core/nm-default-daemon.h:11: included_from: Included from here.
NetworkManager-1.46.0/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c:6: included_from: Included from here.
NetworkManager-1.46.0/src/libnm-std-aux/nm-std-aux.h:202:27: note: in expansion of macro '_NM_BOOLEAN_EXPR_IMPL'
NetworkManager-1.46.0/src/libnm-glib-aux/nm-macros-internal.h:1693:31: note: in expansion of macro 'NM_BOOLEAN_EXPR'
/usr/include/glib-2.0/glib/gmacros.h:1245:45: note: in expansion of macro '_G_BOOLEAN_EXPR'
NetworkManager-1.46.0/src/libnm-glib-aux/nm-str-buf.h:99:9: note: in expansion of macro 'G_UNLIKELY'
<built-in>: note: argument 1 of '__builtin_memcpy' must be non-null
#  254|       if (len > 0) {
#  255|           nm_str_buf_maybe_expand(strbuf, len + 1, FALSE);
#  256|->         memcpy(&strbuf->_priv_str[strbuf->_priv_len], str, len);
#  257|           strbuf->_priv_len += len;
#  258|       }

Scan Properties

analyzer-version-clang18.1.3
analyzer-version-cppcheck2.13.0
analyzer-version-gcc14.0.1
analyzer-version-gcc-analyzer14.0.1
analyzer-version-shellcheck0.10.0
diffbase-analyzer-version-clang18.1.3
diffbase-analyzer-version-cppcheck2.13.0
diffbase-analyzer-version-gcc14.0.1
diffbase-analyzer-version-gcc-analyzer14.0.1
diffbase-analyzer-version-shellcheck0.10.0
diffbase-enabled-pluginsclang, cppcheck, gcc, shellcheck
diffbase-exit-code0
diffbase-hostip-172-16-1-35.us-west-2.compute.internal
diffbase-mock-configfedora-41-x86_64
diffbase-project-nameNetworkManager-1.46.0-2.fc40
diffbase-store-results-to/tmp/tmph4rx9mmc/NetworkManager-1.46.0-2.fc40.tar.xz
diffbase-time-created2024-04-22 11:05:19
diffbase-time-finished2024-04-22 11:25:26
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmph4rx9mmc/NetworkManager-1.46.0-2.fc40.tar.xz' '--gcc-analyze' '/tmp/tmph4rx9mmc/NetworkManager-1.46.0-2.fc40.src.rpm'
diffbase-tool-versioncsmock-3.5.3-1.el9
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-35.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-nameNetworkManager-1.46.0-2.fc41
store-results-to/tmp/tmph6ol3f4o/NetworkManager-1.46.0-2.fc41.tar.xz
time-created2024-04-22 11:25:55
time-finished2024-04-22 11:45:50
titleNewly introduced defects
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmph6ol3f4o/NetworkManager-1.46.0-2.fc41.tar.xz' '--gcc-analyze' '/tmp/tmph6ol3f4o/NetworkManager-1.46.0-2.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9