Newly introduced defects

List of Defects

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1]
logrotate-3.22.0-build/logrotate-3.22.0/config.c: scope_hint: In function ‘readConfigPath’
logrotate-3.22.0-build/logrotate-3.22.0/config.c:772:29: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(".", 65536)’
logrotate-3.22.0-build/logrotate-3.22.0/config.c:14: included_from: Included from here.
logrotate-3.22.0-build/logrotate-3.22.0/config.c:3: included_from: Included from here.
logrotate-3.22.0-build/logrotate-3.22.0/config.c:16: included_from: Included from here.
#  770|           }
#  771|           while ((dp = readdir(dirp)) != NULL) {
#  772|->             if (checkFile(dp->d_name)) {
#  773|                   if (files_count >= UINT_MAX - REALLOC_STEP) {
#  774|                       message(MESS_ERROR, "too many files in directory %s\n", path);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def2]
logrotate-3.22.0-build/logrotate-3.22.0/logrotate.c: scope_hint: In function ‘movefd.part.0’
logrotate-3.22.0-build/logrotate-3.22.0/logrotate.c:357:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘rc’
logrotate-3.22.0-build/logrotate-3.22.0/logrotate.c:5: included_from: Included from here.
logrotate-3.22.0-build/logrotate-3.22.0/logrotate.c:21: included_from: Included from here.
logrotate-3.22.0-build/logrotate-3.22.0/logrotate.c:12: included_from: Included from here.
logrotate-3.22.0-build/logrotate-3.22.0/logrotate.c: scope_hint: In function ‘movefd.part.0’
#  355|   
#  356|       rc = dup2(oldfd, newfd);
#  357|->     if (rc == 0)
#  358|           close(oldfd);
#  359|   

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
diffbase-analyzer-version-clang18.1.7
diffbase-analyzer-version-cppcheck2.14.2
diffbase-analyzer-version-gcc14.1.1
diffbase-analyzer-version-gcc-analyzer14.1.1
diffbase-analyzer-version-shellcheck0.10.0
diffbase-enabled-pluginsclang, cppcheck, gcc, shellcheck
diffbase-exit-code0
diffbase-hostip-172-16-1-10.us-west-2.compute.internal
diffbase-mock-configfedora-41-x86_64
diffbase-project-namelogrotate-3.21.0-6.fc40
diffbase-store-results-to/tmp/tmppuicp24n/logrotate-3.21.0-6.fc40.tar.xz
diffbase-time-created2024-07-03 16:12:57
diffbase-time-finished2024-07-03 16:14:35
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmppuicp24n/logrotate-3.21.0-6.fc40.tar.xz' '--gcc-analyze' '/tmp/tmppuicp24n/logrotate-3.21.0-6.fc40.src.rpm'
diffbase-tool-versioncsmock-3.5.3-1.el9
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-10.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namelogrotate-3.22.0-1.fc41
store-results-to/tmp/tmpsjgmj0u7/logrotate-3.22.0-1.fc41.tar.xz
time-created2024-07-03 16:15:00
time-finished2024-07-03 16:16:13
titleNewly introduced defects
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpsjgmj0u7/logrotate-3.22.0-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpsjgmj0u7/logrotate-3.22.0-1.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9