Fixed findings

List of Findings

Error: COMPILER_WARNING: [#def1]
avahi-0.9.rc4/avahi-core/entry.c: scope_hint: In function 'server_add_dns_server_name'
avahi-0.9.rc4/avahi-core/entry.c:937:32: warning[-Wformat-truncation=]: '%s' directive output may be truncated writing up to 1013 bytes into a region of size between 997 and 1001
#  937 |     snprintf(t, sizeof(t), "%s.%s", type == AVAHI_DNS_SERVER_RESOLVE ? "_domain._udp" : "_dns-update._udp", normalized_d);
#      |                                ^~                                                                           ~~~~~~~~~~~~
/usr/include/bits/stdio2.h:68:10: note: '__snprintf_chk' output between 14 and 1031 bytes into a destination of size 1014
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  935|       AVAHI_ASSERT_TRUE(avahi_normalize_name(domain, normalized_d, sizeof(normalized_d)));
#  936|   
#  937|->     snprintf(t, sizeof(t), "%s.%s", type == AVAHI_DNS_SERVER_RESOLVE ? "_domain._udp" : "_dns-update._udp", normalized_d);
#  938|   
#  939|       if (!(r = avahi_record_new_full(t, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_SRV, AVAHI_DEFAULT_TTL_HOST_NAME))) {

Error: COMPILER_WARNING: [#def2]
avahi-0.9.rc4/avahi-core/entry.c: scope_hint: In function 'avahi_server_add_dns_server_address'
avahi-0.9.rc4/avahi-core/entry.c:989:36: warning[-Wformat-truncation=]: '%s' directive output may be truncated writing up to 63 bytes into a region of size 61
#  989 |         snprintf(n, sizeof(n), "ip-%s.%s", h, domain);
#      |                                    ^~      ~
/usr/include/bits/stdio2.h:68:10: note: '__snprintf_chk' output 5 or more bytes (assuming 68) into a destination of size 64
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  987|       if (address->proto == AVAHI_PROTO_INET) {
#  988|           hexstring(h, sizeof(h), &address->data, sizeof(AvahiIPv4Address));
#  989|->         snprintf(n, sizeof(n), "ip-%s.%s", h, domain);
#  990|           r = avahi_record_new_full(n, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_A, AVAHI_DEFAULT_TTL_HOST_NAME);
#  991|           r->data.a.address = address->data.ipv4;

Error: COMPILER_WARNING: [#def3]
avahi-0.9.rc4/avahi-core/entry.c: scope_hint: In function 'avahi_server_add_dns_server_address'
avahi-0.9.rc4/avahi-core/entry.c:994:37: warning[-Wformat-truncation=]: '%s' directive output may be truncated writing up to 63 bytes into a region of size 60
#  994 |         snprintf(n, sizeof(n), "ip6-%s.%s", h, domain);
#      |                                     ^~      ~
/usr/include/bits/stdio2.h:68:10: note: '__snprintf_chk' output 6 or more bytes (assuming 69) into a destination of size 64
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  992|       } else {
#  993|           hexstring(h, sizeof(h), &address->data, sizeof(AvahiIPv6Address));
#  994|->         snprintf(n, sizeof(n), "ip6-%s.%s", h, domain);
#  995|           r = avahi_record_new_full(n, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_AAAA, AVAHI_DEFAULT_TTL_HOST_NAME);
#  996|           r->data.aaaa.address = address->data.ipv6;

Error: COMPILER_WARNING: [#def4]
avahi-0.9.rc4/avahi-core/iface.c: scope_hint: In function 'avahi_hw_interface_update_rrs'
avahi-0.9.rc4/avahi-core/iface.c:143:45: warning[-Wformat-truncation=]: ' [' directive output may be truncated writing 2 bytes into a region of size between 1 and 64
#  143 |             snprintf(name, sizeof(name), "%s [%s]", unescaped, mac);
#      |                                             ^~
/usr/include/bits/stdio2.h:68:10: note: '__snprintf_chk' output between 4 and 322 bytes into a destination of size 64
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  141|               avahi_unescape_label(&p, unescaped, sizeof(unescaped));
#  142|               avahi_format_mac_address(mac, sizeof(mac), hw->mac_address, hw->mac_address_size);
#  143|->             snprintf(name, sizeof(name), "%s [%s]", unescaped, mac);
#  144|   
#  145|               if (avahi_server_add_service(m->server, hw->entry_group, hw->index, AVAHI_PROTO_UNSPEC, 0, name, "_workstation._tcp", NULL, NULL, 9, NULL) < 0) {

Scan Properties

analyzer-version-clang22.1.4
analyzer-version-clippy1.95.0
analyzer-version-cppcheck2.20.0
analyzer-version-gcc16.0.1
analyzer-version-gcc-analyzer16.0.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clang22.1.4
diffbase-analyzer-version-clippy1.95.0
diffbase-analyzer-version-cppcheck2.20.0
diffbase-analyzer-version-gcc16.0.1
diffbase-analyzer-version-gcc-analyzer16.0.1
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclang, clippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-111.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20260420.180315.gd39a405.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-nameavahi-0.9.rc4-8.20260429094238386719.pr900.9.ge6be113
diffbase-store-results-to/tmp/tmp3n3hz8fl/avahi-0.9.rc4-8.20260429094238386719.pr900.9.ge6be113.tar.xz
diffbase-time-created2026-04-29 09:56:08
diffbase-time-finished2026-04-29 09:59:15
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'cppcheck,shellcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmp3n3hz8fl/avahi-0.9.rc4-8.20260429094238386719.pr900.9.ge6be113.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--cppcheck-add-flag=--enable=style' '-t' 'clang' '/tmp/tmp3n3hz8fl/avahi-0.9.rc4-8.20260429094238386719.pr900.9.ge6be113.src.rpm'
diffbase-tool-versioncsmock-3.8.5-1.el9
enabled-pluginsclang, clippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-111.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260420.180315.gd39a405.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-nameavahi-0.9.rc4-8.20260429074937391551.master.7.g3730966
store-results-to/tmp/tmpcxq842pb/avahi-0.9.rc4-8.20260429074937391551.master.7.g3730966.tar.xz
time-created2026-04-29 09:52:01
time-finished2026-04-29 09:55:54
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'cppcheck,shellcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmpcxq842pb/avahi-0.9.rc4-8.20260429074937391551.master.7.g3730966.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--cppcheck-add-flag=--enable=style' '-t' 'clang' '/tmp/tmpcxq842pb/avahi-0.9.rc4-8.20260429074937391551.master.7.g3730966.src.rpm'
tool-versioncsmock-3.8.5-1.el9