initscripts-10.25-1.fc41

List of Defects

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1]
initscripts-10.25-build/initscripts-10.25/src/genhostid.c: scope_hint: In function ‘main’
initscripts-10.25-build/initscripts-10.25/src/genhostid.c:45:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/random", 0)’
#   43|     int fd = open ("/dev/random", O_RDONLY);
#   44|   
#   45|->   if (fd == -1 || read (fd, &n, sizeof (n)) != sizeof (n)) {
#   46|       srand48 ((long int) time (NULL) ^ (long int) getpid ());
#   47|       n = lrand48 ();

Error: CPPCHECK_WARNING: [#def2]
initscripts-10.25-build/initscripts-10.25/src/rename_device.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def3]
initscripts-10.25-build/initscripts-10.25/src/usernetctl.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def4]
initscripts-10.25-build/initscripts-10.25/src/usleep.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-168.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-nameinitscripts-10.25-1.fc41
store-results-to/tmp/tmp8b9_q_0a/initscripts-10.25-1.fc41.tar.xz
time-created2024-07-03 13:14:59
time-finished2024-07-03 13:15:50
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp8b9_q_0a/initscripts-10.25-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmp8b9_q_0a/initscripts-10.25-1.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9