Fixed findings

List of Findings

Error: COMPILER_WARNING: [#def1]
numad-0.5git/numad.c: scope_hint: In function ‘numad_log’
numad-0.5git/numad.c:150:5: warning[-Wstringop-truncation]: ‘strncpy’ specified bound 1024 equals destination size
#  150 |     strncpy(buf, ctime(&ts), sizeof(buf));
#      |     ^
#  148|       char buf[BUF_SIZE];
#  149|       time_t ts = time(NULL);
#  150|->     strncpy(buf, ctime(&ts), sizeof(buf));
#  151|       char *p = &buf[strlen(buf) - 1];
#  152|       *p++ = ':';

Error: CPPCHECK_WARNING (CWE-476): [#def2]
numad-0.5git/numad.c:1508: warning[nullPointer]: Possible null pointer dereference: pid_string
# 1506|           snprintf(fname, FNAME_SIZE, "/proc/%d/stat", pid);
# 1507|       } else {
# 1508|->         snprintf(fname, FNAME_SIZE, "/proc/%s/stat", pid_string);
# 1509|       }
# 1510|       int fd = open(fname, O_RDONLY, 0);

Error: COMPILER_WARNING (CWE-758): [#def3]
numad-0.5git/numad.c: scope_hint: In function ‘main’
numad-0.5git/numad.c:2636:28: warning[-Wrestrict]: passing argument 1 to ‘restrict’-qualified parameter aliases with argument 4
# 2636 |         if (pthread_create(&tid, &attr, &set_dynamic_options, &tid) != 0) {
#      |                            ^~~~                               ~~~~
# 2634|           }
# 2635|           pthread_t tid;
# 2636|->         if (pthread_create(&tid, &attr, &set_dynamic_options, &tid) != 0) {
# 2637|               numad_log(LOG_CRIT, "pthread_create failure: setting thread\n");
# 2638|               exit(EXIT_FAILURE);

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.92.0
diffbase-analyzer-version-cppcheck2.19.1
diffbase-analyzer-version-gcc16.0.0
diffbase-analyzer-version-gcc-analyzer16.0.0
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-18.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.20250521.132812.g8eff701.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-namenumad-0.5-49.20251104git.fc44
diffbase-store-results-to/tmp/tmp6hmnczyy/numad-0.5-49.20251104git.fc44.tar.xz
diffbase-time-created2026-01-08 19:41:49
diffbase-time-finished2026-01-08 19:43:07
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmp6hmnczyy/numad-0.5-49.20251104git.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp6hmnczyy/numad-0.5-49.20251104git.fc44.src.rpm'
diffbase-tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-18.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namenumad-0.5-47.20150602git.fc43
store-results-to/tmp/tmp9ppgs0lw/numad-0.5-47.20150602git.fc43.tar.xz
time-created2026-01-08 19:39:46
time-finished2026-01-08 19:41:30
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmp9ppgs0lw/numad-0.5-47.20150602git.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp9ppgs0lw/numad-0.5-47.20150602git.fc43.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9