c-ares-1.28.1-1.fc41
List of Defects
Error: CPPCHECK_WARNING (CWE-457): [#def1]
c-ares-1.28.1/src/lib/ares__buf.c:990: warning[uninitvar]: Uninitialized variable: status
# 988|
# 989|
# 990|-> if (status != ARES_SUCCESS) {
# 991| ares__buf_destroy(binbuf);
# 992| } else {
Error: COMPILER_WARNING (CWE-252): [#def2]
c-ares-1.28.1/src/lib/ares_event_wake_pipe.c: scope_hint: In function ‘ares_pipeevent_signal’
c-ares-1.28.1/src/lib/ares_event_wake_pipe.c:120:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
# 120 | (void)write(p->filedes[1], "1", 1);
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 118|
# 119| p = e->data;
# 120|-> (void)write(p->filedes[1], "1", 1);
# 121| }
# 122|
Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
c-ares-1.28.1/src/lib/ares_getnameinfo.c: scope_hint: In function ‘ares_getnameinfo_int’
c-ares-1.28.1/src/lib/ares_getnameinfo.c:175:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘addr’
# 173| if (sa->sa_family == AF_INET) {
# 174| niquery->family = AF_INET;
# 175|-> memcpy(&niquery->addr.addr4, addr, sizeof(niquery->addr.addr4));
# 176| ares_gethostbyaddr(channel, &addr->sin_addr, sizeof(struct in_addr),
# 177| AF_INET, nameinfo_callback, niquery);
Error: GCC_ANALYZER_WARNING (CWE-688): [#def4]
c-ares-1.28.1/src/lib/ares_getnameinfo.c:180:9: warning[-Wanalyzer-null-argument]: use of NULL ‘addr6’ where non-null expected
<built-in>: note: argument 2 of ‘__builtin_memcpy’ must be non-null
# 178| } else {
# 179| niquery->family = AF_INET6;
# 180|-> memcpy(&niquery->addr.addr6, addr6, sizeof(niquery->addr.addr6));
# 181| ares_gethostbyaddr(channel, &addr6->sin6_addr,
# 182| sizeof(struct ares_in6_addr), AF_INET6,
Error: GCC_ANALYZER_WARNING (CWE-775): [#def5]
c-ares-1.28.1/src/lib/ares_rand.c: scope_hint: In function ‘ares__rand_bytes_fetch’
c-ares-1.28.1/src/lib/ares_rand.c:303:14: warning[-Wanalyzer-file-leak]: leak of FILE ‘*state.state.rand_file’
c-ares-1.28.1/src/lib/ares_rand.c: scope_hint: In function ‘ares__rand_bytes_fetch’
c-ares-1.28.1/src/lib/ares_rand.c: scope_hint: In function ‘ares__rand_bytes_fetch’
c-ares-1.28.1/src/lib/ares_rand.c: scope_hint: In function ‘ares__rand_bytes_fetch’
# 301| size_t rv = fread(buf + bytes_read, 1, len - bytes_read,
# 302| state->state.rand_file);
# 303|-> if (rv == 0) {
# 304| break; /* critical error, will reinit rand state */
# 305| }
Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
c-ares-1.28.1/src/lib/ares_rand.c:303:14: warning[-Wanalyzer-malloc-leak]: leak of ‘*state.state.rand_file’
c-ares-1.28.1/src/lib/ares_rand.c: scope_hint: In function ‘ares__rand_bytes_fetch’
c-ares-1.28.1/src/lib/ares_rand.c: scope_hint: In function ‘ares__rand_bytes_fetch’
c-ares-1.28.1/src/lib/ares_rand.c: scope_hint: In function ‘ares__rand_bytes_fetch’
# 301| size_t rv = fread(buf + bytes_read, 1, len - bytes_read,
# 302| state->state.rand_file);
# 303|-> if (rv == 0) {
# 304| break; /* critical error, will reinit rand state */
# 305| }
Scan Properties
analyzer-version-clang | 18.1.3 |
analyzer-version-cppcheck | 2.13.0 |
analyzer-version-gcc | 14.0.1 |
analyzer-version-gcc-analyzer | 14.0.1 |
analyzer-version-shellcheck | 0.10.0 |
enabled-plugins | clang, cppcheck, gcc, shellcheck |
exit-code | 0 |
host | ip-172-16-1-71.us-west-2.compute.internal |
mock-config | fedora-41-x86_64 |
project-name | c-ares-1.28.1-1.fc41 |
store-results-to | /tmp/tmpczrof_2z/c-ares-1.28.1-1.fc41.tar.xz |
time-created | 2024-04-22 10:53:40 |
time-finished | 2024-04-22 10:55:03 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpczrof_2z/c-ares-1.28.1-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpczrof_2z/c-ares-1.28.1-1.fc41.src.rpm' |
tool-version | csmock-3.5.3-1.el9 |