libasyncns-0.8-32.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1]
libasyncns-0.8/libasyncns/asyncns.c:1044:20: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(packet + 48, *(const nameinfo_response_t *)packet.hostlen + 18446744073709551615)’
libasyncns-0.8/libasyncns/asyncns.c:1084:5: enter_function: entry to ‘asyncns_wait’
libasyncns-0.8/libasyncns/asyncns.c:1086:5: branch_true: following ‘true’ branch (when ‘asyncns’ is non-NULL)...
libasyncns-0.8/libasyncns/asyncns.c:1086:5: branch_true: ...to here
libasyncns-0.8/libasyncns/asyncns.c:1092:12: branch_false: following ‘false’ branch...
libasyncns-0.8/libasyncns/asyncns.c:1097:19: branch_false: ...to here
libasyncns-0.8/libasyncns/asyncns.c:1097:12: branch_false: following ‘false’ branch...
libasyncns-0.8/libasyncns/asyncns.c:1115:13: branch_false: ...to here
libasyncns-0.8/libasyncns/asyncns.c:1115:13: call_function: calling ‘handle_response’ from ‘asyncns_wait’
# 1042|   
# 1043|               if (ni_resp->hostlen)
# 1044|->                 if (!(q->host = strndup((const char*) ni_resp + sizeof(nameinfo_response_t), ni_resp->hostlen-1)))
# 1045|                       q->ret = EAI_MEMORY;
# 1046|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
libasyncns-0.8/libasyncns/asyncns.c:1048:20: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(ni_resp + (*(const nameinfo_response_t *)packet.hostlen + 48), *(const nameinfo_response_t *)packet.servlen + 18446744073709551615)’
libasyncns-0.8/libasyncns/asyncns.c:1084:5: enter_function: entry to ‘asyncns_wait’
libasyncns-0.8/libasyncns/asyncns.c:1086:5: branch_true: following ‘true’ branch (when ‘asyncns’ is non-NULL)...
libasyncns-0.8/libasyncns/asyncns.c:1086:5: branch_true: ...to here
libasyncns-0.8/libasyncns/asyncns.c:1092:12: branch_false: following ‘false’ branch...
libasyncns-0.8/libasyncns/asyncns.c:1097:19: branch_false: ...to here
libasyncns-0.8/libasyncns/asyncns.c:1097:12: branch_false: following ‘false’ branch...
libasyncns-0.8/libasyncns/asyncns.c:1115:13: branch_false: ...to here
libasyncns-0.8/libasyncns/asyncns.c:1115:13: call_function: calling ‘handle_response’ from ‘asyncns_wait’
# 1046|   
# 1047|               if (ni_resp->servlen)
# 1048|->                 if (!(q->serv = strndup((const char*) ni_resp + sizeof(nameinfo_response_t) + ni_resp->hostlen, ni_resp->servlen-1)))
# 1049|                       q->ret = EAI_MEMORY;
# 1050|   

Error: COMPILER_WARNING (CWE-569): [#def3]
libasyncns-0.8/libasyncns/asyncns.c: scope_hint: In function ‘asyncns_setuserdata’
libasyncns-0.8/libasyncns/asyncns.c:1509:5: warning[-Wparentheses]: suggest parentheses around assignment used as truth value
# 1509 |     assert(q->asyncns = asyncns);
#      |     ^~~~~~
# 1507|       assert(q);
# 1508|       assert(asyncns);
# 1509|->     assert(q->asyncns = asyncns);
# 1510|   
# 1511|       q->userdata = userdata;

Error: COMPILER_WARNING (CWE-569): [#def4]
libasyncns-0.8/libasyncns/asyncns.c:27: included_from: Included from here.
libasyncns-0.8/libasyncns/asyncns.c:1509:12: warning[-Wparentheses]: suggest parentheses around assignment used as truth value
# 1509 |     assert(q->asyncns = asyncns);
#      |            ^
# 1507|       assert(q);
# 1508|       assert(asyncns);
# 1509|->     assert(q->asyncns = asyncns);
# 1510|   
# 1511|       q->userdata = userdata;

Error: COMPILER_WARNING (CWE-569): [#def5]
libasyncns-0.8/libasyncns/asyncns.c: scope_hint: In function ‘asyncns_getuserdata’
libasyncns-0.8/libasyncns/asyncns.c:1517:5: warning[-Wparentheses]: suggest parentheses around assignment used as truth value
# 1517 |     assert(q->asyncns = asyncns);
#      |     ^~~~~~
# 1515|       assert(q);
# 1516|       assert(asyncns);
# 1517|->     assert(q->asyncns = asyncns);
# 1518|   
# 1519|       return q->userdata;

Error: COMPILER_WARNING (CWE-569): [#def6]
libasyncns-0.8/libasyncns/asyncns.c:1517:12: warning[-Wparentheses]: suggest parentheses around assignment used as truth value
# 1517 |     assert(q->asyncns = asyncns);
#      |            ^
# 1515|       assert(q);
# 1516|       assert(asyncns);
# 1517|->     assert(q->asyncns = asyncns);
# 1518|   
# 1519|       return q->userdata;

Scan Properties

analyzer-version-clippy1.97.1
analyzer-version-cppcheck2.21.1
analyzer-version-gcc16.1.1
analyzer-version-gcc-analyzer16.1.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-197.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namelibasyncns-0.8-32.fc44
store-results-to/tmp/tmp215uus4r/libasyncns-0.8-32.fc44.tar.xz
time-created2026-08-03 16:57:19
time-finished2026-08-03 16:59:13
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmp215uus4r/libasyncns-0.8-32.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp215uus4r/libasyncns-0.8-32.fc44.src.rpm'
tool-versioncsmock-3.8.7.20260803.142340.gb75b18e-1.el9