Error: GCC_ANALYZER_WARNING (CWE-401): [#def1] logrotate-3.21.0-build/logrotate-3.21.0/config.c: scope_hint: In function ‘readAddress’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:159:23: warning[-Wanalyzer-malloc-leak]: leak of ‘isolateValue(configFile, lineNum, key, startPtr, buf, length)’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:14: included_from: Included from here. logrotate-3.21.0-build/logrotate-3.21.0/config.c:3: included_from: Included from here. logrotate-3.21.0-build/logrotate-3.21.0/config.c:16: included_from: Included from here. logrotate-3.21.0-build/logrotate-3.21.0/config.c:520:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:530:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:530:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:530:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:505:14: note: in definition of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:531:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:531:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:531:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:505:14: note: in definition of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:532:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:532:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:532:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:505:14: note: in definition of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:533:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:533:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:533:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:505:14: note: in definition of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:534:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:534:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:534:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:505:14: note: in definition of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:535:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:535:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:535:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:505:14: note: in definition of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:536:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:536:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:536:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:505:14: note: in definition of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:537:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:537:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:537:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:505:14: note: in definition of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:538:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:538:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:538:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:505:14: note: in definition of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:539:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:539:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:539:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:560:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:560:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:560:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:1425:25: note: in expansion of macro ‘freeLogItem’ # 157| static char *isolateLine(char **strt, char **buf, size_t length) { # 158| char *endtag, *start, *tmp; # 159|-> const char *max = *buf + length; # 160| char *key; # 161| Error: GCC_ANALYZER_WARNING (CWE-415): [#def2] logrotate-3.21.0-build/logrotate-3.21.0/config.c: scope_hint: In function ‘free_2d_array’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:500:5: warning[-Wanalyzer-double-free]: double-‘free’ of ‘array’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:520:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:530:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:530:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:530:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:505:14: note: in definition of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:531:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:531:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:531:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:505:14: note: in definition of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:532:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:532:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:532:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:505:14: note: in definition of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:533:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:533:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:533:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:505:14: note: in definition of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:534:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:534:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:534:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:505:14: note: in definition of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:535:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:535:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:535:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:505:14: note: in definition of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:536:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:536:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:536:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:505:14: note: in definition of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:537:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:537:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:537:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:505:14: note: in definition of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:538:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:538:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:538:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:505:14: note: in definition of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:539:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:539:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:539:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:560:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:560:5: note: in expansion of macro ‘MEMBER_COPY’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:560:5: note: in expansion of macro ‘MEMBER_COPY’ # 498| for (i = 0; i < lines_count; ++i) # 499| free(array[i]); # 500|-> free(array); # 501| } # 502| Error: GCC_ANALYZER_WARNING (CWE-775): [#def3] logrotate-3.21.0-build/logrotate-3.21.0/config.c: scope_hint: In function ‘readConfigPath’ logrotate-3.21.0-build/logrotate-3.21.0/config.c:684:29: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(".", 0)’ # 682| } # 683| while ((dp = readdir(dirp)) != NULL) { # 684|-> if (checkFile(dp->d_name)) { # 685| /* Realloc memory for namelist array if necessary */ # 686| if (files_count % REALLOC_STEP == 0) {
analyzer-version-clang | 18.1.7 |
analyzer-version-cppcheck | 2.14.2 |
analyzer-version-gcc | 14.1.1 |
analyzer-version-gcc-analyzer | 14.1.1 |
analyzer-version-shellcheck | 0.10.0 |
diffbase-analyzer-version-clang | 18.1.7 |
diffbase-analyzer-version-cppcheck | 2.14.2 |
diffbase-analyzer-version-gcc | 14.1.1 |
diffbase-analyzer-version-gcc-analyzer | 14.1.1 |
diffbase-analyzer-version-shellcheck | 0.10.0 |
diffbase-enabled-plugins | clang, cppcheck, gcc, shellcheck |
diffbase-exit-code | 0 |
diffbase-host | ip-172-16-1-10.us-west-2.compute.internal |
diffbase-mock-config | fedora-41-x86_64 |
diffbase-project-name | logrotate-3.22.0-1.fc41 |
diffbase-store-results-to | /tmp/tmpsjgmj0u7/logrotate-3.22.0-1.fc41.tar.xz |
diffbase-time-created | 2024-07-03 16:15:00 |
diffbase-time-finished | 2024-07-03 16:16:13 |
diffbase-tool | csmock |
diffbase-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' |
diffbase-tool-version | csmock-3.5.3-1.el9 |
enabled-plugins | clang, cppcheck, gcc, shellcheck |
exit-code | 0 |
host | ip-172-16-1-10.us-west-2.compute.internal |
mock-config | fedora-41-x86_64 |
project-name | logrotate-3.21.0-6.fc40 |
store-results-to | /tmp/tmppuicp24n/logrotate-3.21.0-6.fc40.tar.xz |
time-created | 2024-07-03 16:12:57 |
time-finished | 2024-07-03 16:14:35 |
title | Fixed defects |
tool | csmock |
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' |
tool-version | csmock-3.5.3-1.el9 |