rsync-3.3.0-2.fc41
List of Defects
Error: CPPCHECK_WARNING: [#def1]
rsync-3.3.0-build/rsync-3.3.0/access.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def2]
rsync-3.3.0-build/rsync-3.3.0/acls.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: COMPILER_WARNING (CWE-457): [#def3]
rsync-3.3.0-build/rsync-3.3.0/acls.c: scope_hint: In function ‘unpack_smb_acl’
rsync-3.3.0-build/rsync-3.3.0/acls.c:319:25: warning[-Wmaybe-uninitialized]: ‘g_u_id’ may be used uninitialized
# 319 | ida->id = g_u_id;
# | ^
rsync-3.3.0-build/rsync-3.3.0/acls.c:275:22: note: ‘g_u_id’ was declared here
# 275 | id_t g_u_id;
# | ^
# 317| }
# 318| ida = EXPAND_ITEM_LIST(&temp_ida_list, id_access, -10);
# 319|-> ida->id = g_u_id;
# 320| ida->access = access;
# 321| }
Error: CPPCHECK_WARNING: [#def4]
rsync-3.3.0-build/rsync-3.3.0/authenticate.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-775): [#def5]
rsync-3.3.0-build/rsync-3.3.0/authenticate.c: scope_hint: In function ‘getpassf’
rsync-3.3.0-build/rsync-3.3.0/authenticate.c:192:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filename, 0)’
# 190| }
# 191|
# 192|-> if (do_stat(filename, &st) == -1) {
# 193| rsyserr(FERROR, errno, "stat(%s)", filename);
# 194| exit_cleanup(RERR_SYNTAX);
Error: GCC_ANALYZER_WARNING (CWE-775): [#def6]
rsync-3.3.0-build/rsync-3.3.0/authenticate.c:196:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filename, 0)’
# 194| exit_cleanup(RERR_SYNTAX);
# 195| }
# 196|-> if ((st.st_mode & 06) != 0) {
# 197| rprintf(FERROR, "ERROR: password file must not be other-accessible\n");
# 198| exit_cleanup(RERR_SYNTAX);
Error: GCC_ANALYZER_WARNING (CWE-476): [#def7]
rsync-3.3.0-build/rsync-3.3.0/authenticate.c: scope_hint: In function ‘auth_server’
rsync-3.3.0-build/rsync-3.3.0/authenticate.c:298:52: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘auth_uid_groups’
# 296| }
# 297| for (j = 0; j < auth_uid_groups_cnt; j++) {
# 298|-> if (auth_uid_groups[j] && wildmatch(tok+1, auth_uid_groups[j])) {
# 299| group_match = j;
# 300| break;
Error: CPPCHECK_WARNING: [#def8]
rsync-3.3.0-build/rsync-3.3.0/backup.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def9]
rsync-3.3.0-build/rsync-3.3.0/batch.c:196:6: warning[deadcode.DeadStores]: Value stored to 'err' during its initialization is never read
# 194| {
# 195| int len = strlen(opt);
# 196|-> int err = write(batch_sh_fd, " ", 1) != 1;
# 197| err = write(batch_sh_fd, opt, len) != len ? 1 : 0;
# 198| if (arg) {
Error: CPPCHECK_WARNING: [#def10]
rsync-3.3.0-build/rsync-3.3.0/checksum.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def11]
rsync-3.3.0-build/rsync-3.3.0/checksum.c:376:3: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
# 374| }
# 375|
# 376|-> memcpy(buf1, buf, len);
# 377| if (checksum_seed) {
# 378| SIVAL(buf1,len,checksum_seed);
Error: CPPCHECK_WARNING: [#def12]
rsync-3.3.0-build/rsync-3.3.0/cleanup.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def13]
rsync-3.3.0-build/rsync-3.3.0/clientname.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def14]
rsync-3.3.0-build/rsync-3.3.0/clientserver.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-775): [#def15]
rsync-3.3.0-build/rsync-3.3.0/clientserver.c: scope_hint: In function ‘become_daemon’
rsync-3.3.0-build/rsync-3.3.0/clientserver.c:1492:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor
# 1490| for (i = 0; i < 3; i++) {
# 1491| close(i);
# 1492|-> open("/dev/null", O_RDWR);
# 1493| }
# 1494| }
Error: GCC_ANALYZER_WARNING (CWE-775): [#def16]
rsync-3.3.0-build/rsync-3.3.0/clientserver.c: scope_hint: In function ‘daemon_main’
rsync-3.3.0-build/rsync-3.3.0/clientserver.c:1506:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor
# 1504| for (i = 1; i < 3; i++) {
# 1505| close(i);
# 1506|-> open("/dev/null", O_RDWR);
# 1507| }
# 1508|
Error: CPPCHECK_WARNING: [#def17]
rsync-3.3.0-build/rsync-3.3.0/compat.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def18]
rsync-3.3.0-build/rsync-3.3.0/delete.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def19]
rsync-3.3.0-build/rsync-3.3.0/exclude.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def20]
rsync-3.3.0-build/rsync-3.3.0/fileio.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def21]
rsync-3.3.0-build/rsync-3.3.0/flist.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: COMPILER_WARNING (CWE-697): [#def22]
rsync-3.3.0-build/rsync-3.3.0/flist.c: scope_hint: In function ‘fattr_compare’
rsync-3.3.0-build/rsync-3.3.0/flist.c:293:13: warning[-Waddress]: the comparison will always evaluate as ‘true’ for the address of ‘basename’ will never be NULL
# 293 | if (!f1->basename || !S_ISREG(f1->mode) || !len1) {
# | ^
rsync-3.3.0-build/rsync-3.3.0/flist.c:23: included_from: Included from here.
rsync-3.3.0-build/rsync-3.3.0/rsync.h:808:20: note: ‘basename’ declared here
# 808 | const char basename[]; /* The basename (AKA filename) follows */
# | ^~~~~~~~
# 291| int diff;
# 292|
# 293|-> if (!f1->basename || !S_ISREG(f1->mode) || !len1) {
# 294| if (!f2->basename || !S_ISREG(f2->mode) || !len2)
# 295| return 0;
Error: COMPILER_WARNING (CWE-697): [#def23]
rsync-3.3.0-build/rsync-3.3.0/flist.c:294:21: warning[-Waddress]: the comparison will always evaluate as ‘true’ for the address of ‘basename’ will never be NULL
# 294 | if (!f2->basename || !S_ISREG(f2->mode) || !len2)
# | ^
rsync-3.3.0-build/rsync-3.3.0/rsync.h:808:20: note: ‘basename’ declared here
# 808 | const char basename[]; /* The basename (AKA filename) follows */
# | ^~~~~~~~
# 292|
# 293| if (!f1->basename || !S_ISREG(f1->mode) || !len1) {
# 294|-> if (!f2->basename || !S_ISREG(f2->mode) || !len2)
# 295| return 0;
# 296| return 1;
Error: COMPILER_WARNING (CWE-697): [#def24]
rsync-3.3.0-build/rsync-3.3.0/flist.c:298:13: warning[-Waddress]: the comparison will always evaluate as ‘true’ for the address of ‘basename’ will never be NULL
# 298 | if (!f2->basename || !S_ISREG(f2->mode) || !len2)
# | ^
rsync-3.3.0-build/rsync-3.3.0/rsync.h:808:20: note: ‘basename’ declared here
# 808 | const char basename[]; /* The basename (AKA filename) follows */
# | ^~~~~~~~
# 296| return 1;
# 297| }
# 298|-> if (!f2->basename || !S_ISREG(f2->mode) || !len2)
# 299| return -1;
# 300|
Error: CLANG_WARNING: [#def25]
rsync-3.3.0-build/rsync-3.3.0/flist.c:809:29: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
# 807| if ((basename = strrchr(thisname, '/')) != NULL) {
# 808| int len = basename++ - thisname;
# 809|-> if (len != lastdir_len || memcmp(thisname, lastdir, len) != 0) {
# 810| lastdir = new_array(char, len + 1);
# 811| memcpy(lastdir, thisname, len);
Error: CLANG_WARNING: [#def26]
rsync-3.3.0-build/rsync-3.3.0/flist.c:1417:29: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
# 1415| if ((basename = strrchr(thisname, '/')) != NULL) {
# 1416| int len = basename++ - thisname;
# 1417|-> if (len != lastdir_len || memcmp(thisname, lastdir, len) != 0) {
# 1418| lastdir = new_array(char, len + 1);
# 1419| memcpy(lastdir, thisname, len);
Error: CLANG_WARNING: [#def27]
rsync-3.3.0-build/rsync-3.3.0/flist.c:1889:24: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value
# 1887|
# 1888| p = fbuf + len;
# 1889|-> if (len == 1 && *fbuf == '/')
# 1890| remainder = MAXPATHLEN - 1;
# 1891| else if (len < MAXPATHLEN-1) {
Error: COMPILER_WARNING (CWE-697): [#def28]
rsync-3.3.0-build/rsync-3.3.0/flist.c: scope_hint: In function ‘recv_file_list’
rsync-3.3.0-build/rsync-3.3.0/flist.c:2778:29: warning[-Waddress]: the comparison will always evaluate as ‘true’ for the address of ‘basename’ will never be NULL
# 2778 | if (fp->basename && S_ISREG(fp->mode) && F_LENGTH(fp))
# | ^~
rsync-3.3.0-build/rsync-3.3.0/rsync.h:808:20: note: ‘basename’ declared here
# 808 | const char basename[]; /* The basename (AKA filename) follows */
# | ^~~~~~~~
# 2776| while (j-- > 0) {
# 2777| struct file_struct *fp = the_fattr_list.files[j];
# 2778|-> if (fp->basename && S_ISREG(fp->mode) && F_LENGTH(fp))
# 2779| break;
# 2780| }
Error: CPPCHECK_WARNING: [#def29]
rsync-3.3.0-build/rsync-3.3.0/generator.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def30]
rsync-3.3.0-build/rsync-3.3.0/hashtable.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def31]
rsync-3.3.0-build/rsync-3.3.0/hashtable.c:128:8: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
# 126| SIVALu(buf, 0, key);
# 127| for (ndx = 0, i = 0; i < 4; i++) {
# 128|-> ndx += keyp[i];
# 129| ndx += (ndx << 10);
# 130| ndx ^= (ndx >> 6);
Error: CPPCHECK_WARNING: [#def32]
rsync-3.3.0-build/rsync-3.3.0/hlink.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-476): [#def33]
rsync-3.3.0-build/rsync-3.3.0/rsync.h:1115: included_from: Included from here.
rsync-3.3.0-build/rsync-3.3.0/hlink.c:23: included_from: Included from here.
rsync-3.3.0-build/rsync-3.3.0/hlink.c: scope_hint: In function ‘match_gnums’
rsync-3.3.0-build/rsync-3.3.0/hlink.c:172:45: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘node’
rsync-3.3.0-build/rsync-3.3.0/byteorder.h:33:43: note: in definition of macro ‘CVAL’
rsync-3.3.0-build/rsync-3.3.0/byteorder.h:33:43: note: in definition of macro ‘CVAL’
rsync-3.3.0-build/rsync-3.3.0/byteorder.h:33:43: note: in definition of macro ‘CVAL’
# 170| file->flags |= FLAG_HLINK_LAST;
# 171| F_HL_PREV(file) = prev;
# 172|-> if (inc_recurse && CVAL(node->data, 0) == 0) {
# 173| if (unsort_ndx)
# 174| prev = F_NDX(file);
Error: CPPCHECK_WARNING (CWE-476): [#def34]
rsync-3.3.0-build/rsync-3.3.0/ifuncs.h:108: error[ctunullpointer]: Null pointer dereference: str
# 106| static inline char *my_strdup(const char *str, const char *file, int line)
# 107| {
# 108|-> int len = strlen(str)+1;
# 109| char *buf = my_alloc(NULL, len, 1, file, line);
# 110| memcpy(buf, str, len);
Error: CPPCHECK_WARNING: [#def35]
rsync-3.3.0-build/rsync-3.3.0/io.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING (CWE-758): [#def36]
rsync-3.3.0-build/rsync-3.3.0/io.c:1817: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
# 1815| u.b[0] = ch;
# 1816| #if CAREFUL_ALIGNMENT
# 1817|-> u.x = IVAL(u.b,0);
# 1818| #endif
# 1819| #if SIZEOF_INT32 > 4
Error: CPPCHECK_WARNING (CWE-758): [#def37]
rsync-3.3.0-build/rsync-3.3.0/io.c:1862: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
# 1860| u.x = IVAL(u.b,0);
# 1861| #elif CAREFUL_ALIGNMENT
# 1862|-> u.x = IVAL64(u.b,0);
# 1863| #endif
# 1864| return u.x;
Error: CLANG_WARNING: [#def38]
rsync-3.3.0-build/rsync-3.3.0/io.c:2096:34: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value
# 2094| SIVAL(b, 1, x);
# 2095|
# 2096|-> for (cnt = 4; cnt > 1 && b[cnt] == 0; cnt--) {}
# 2097| bit = ((uchar)1<<(7-cnt+1));
# 2098|
Error: CLANG_WARNING: [#def39]
rsync-3.3.0-build/rsync-3.3.0/io.c:2128:35: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value
# 2126| #endif
# 2127|
# 2128|-> while (cnt > min_bytes && b[cnt] == 0)
# 2129| cnt--;
# 2130| bit = ((uchar)1<<(7-cnt+min_bytes));
Error: CLANG_WARNING: [#def40]
rsync-3.3.0-build/rsync-3.3.0/io.c:2131:19: warning[core.UndefinedBinaryOperatorResult]: The left operand of '>=' is a garbage value
# 2129| cnt--;
# 2130| bit = ((uchar)1<<(7-cnt+min_bytes));
# 2131|-> if (CVAL(b, cnt) >= bit) {
# 2132| cnt++;
# 2133| *b = ~(bit-1);
Error: CPPCHECK_WARNING: [#def41]
rsync-3.3.0-build/rsync-3.3.0/lib/compat.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def42]
rsync-3.3.0-build/rsync-3.3.0/lib/md5.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def43]
rsync-3.3.0-build/rsync-3.3.0/lib/permstring.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def44]
rsync-3.3.0-build/rsync-3.3.0/lib/pool_alloc.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def45]
rsync-3.3.0-build/rsync-3.3.0/lib/wildmatch.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def46]
rsync-3.3.0-build/rsync-3.3.0/loadparm.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING (CWE-401): [#def47]
rsync-3.3.0-build/rsync-3.3.0/loadparm.c:207: error[memleakOnRealloc]: Common realloc mistake: 'buf' nulled but not freed upon failure
# 205| }
# 206|
# 207|-> if (bufsize && (buf = realloc(buf, t - buf + 1)) == NULL)
# 208| out_of_memory("expand_vars");
# 209|
Error: GCC_ANALYZER_WARNING (CWE-401): [#def48]
rsync-3.3.0-build/rsync-3.3.0/loadparm.c: scope_hint: In function ‘do_parameter’
rsync-3.3.0-build/rsync-3.3.0/loadparm.c:463:20: warning[-Wanalyzer-malloc-leak]: leak of ‘parmvalue’
rsync-3.3.0-build/rsync-3.3.0/loadparm.c:458:29: note: in expansion of macro ‘strequal’
# 461| }
# 462| }
# 463|-> if (!parm_table[parmnum].enum_list[i].name) {
# 464| if (atoi(parmvalue) > 0)
# 465| *(int *)parm_ptr = atoi(parmvalue);
Error: GCC_ANALYZER_WARNING (CWE-476): [#def49]
rsync-3.3.0-build/rsync-3.3.0/loadparm.c: scope_hint: In function ‘set_dparams’
rsync-3.3.0-build/rsync-3.3.0/loadparm.c:555:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘equal’
# 553| for (j = 0; j < dparam_list.count; j++) {
# 554| equal = strchr(params[j], '='); /* options.c verified this */
# 555|-> *equal = '\0';
# 556| if (syntax_check_only) {
# 557| if (map_parameter(params[j]) < 0) {
Error: CPPCHECK_WARNING: [#def50]
rsync-3.3.0-build/rsync-3.3.0/log.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING (CWE-457): [#def51]
rsync-3.3.0-build/rsync-3.3.0/log.c:375: error[uninitvar]: Uninitialized variable: convbuf
# 373| if (outbuf.len) {
# 374| char trailing = inbuf.len ? '\0' : trailing_CR_or_NL;
# 375|-> filtered_fwrite(f, convbuf, outbuf.len, 0, trailing);
# 376| if (trailing) {
# 377| trailing_CR_or_NL = '\0';
Error: CPPCHECK_WARNING: [#def52]
rsync-3.3.0-build/rsync-3.3.0/main.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def53]
rsync-3.3.0-build/rsync-3.3.0/main.c:734:9: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'cp')
# 732| if (ret && (INFO_GTE(NAME, 1) || stdout_format_has_i)) {
# 733| if (file_total == 1 || trailing_slash)
# 734|-> *cp = '\0';
# 735| rprintf(FINFO, "created %d director%s for %s\n", ret, ret == 1 ? "y" : "ies", dest_path);
# 736| if (file_total == 1 || trailing_slash)
Error: CLANG_WARNING: [#def54]
rsync-3.3.0-build/rsync-3.3.0/main.c:737:9: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'cp')
# 735| rprintf(FINFO, "created %d director%s for %s\n", ret, ret == 1 ? "y" : "ies", dest_path);
# 736| if (file_total == 1 || trailing_slash)
# 737|-> *cp = '/';
# 738| }
# 739| if (ret)
Error: CLANG_WARNING: [#def55]
rsync-3.3.0-build/rsync-3.3.0/main.c:849:16: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
# 847| for (j = 0; j < basis_dir_cnt; j++) {
# 848| char *bdir = basis_dir[j];
# 849|-> int bd_len = strlen(bdir);
# 850| if (bd_len > 1 && bdir[bd_len-1] == '/')
# 851| bdir[--bd_len] = '\0';
Error: CLANG_WARNING: [#def56]
rsync-3.3.0-build/rsync-3.3.0/main.c:1317:3: warning[deadcode.DeadStores]: Value stored to 'flist' is never read
# 1315| become_copy_as_user();
# 1316|
# 1317|-> flist = send_file_list(f_out, argc, argv);
# 1318| if (DEBUG_GTE(FLIST, 3))
# 1319| rprintf(FINFO,"file list sent\n");
Error: CPPCHECK_WARNING: [#def57]
rsync-3.3.0-build/rsync-3.3.0/match.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def58]
rsync-3.3.0-build/rsync-3.3.0/options.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def59]
rsync-3.3.0-build/rsync-3.3.0/options.c:1480:4: warning[deadcode.DeadStores]: Value stored to 'argv' is never read
# 1478| } else if (poptDupArgv(argc, argv, argc_p, argv_p) != 0)
# 1479| out_of_memory("parse_arguments");
# 1480|-> argv = *argv_p;
# 1481| poptFreeContext(pc);
# 1482|
Error: CLANG_WARNING: [#def60]
rsync-3.3.0-build/rsync-3.3.0/options.c:3132:8: warning[core.uninitialized.Branch]: Branch condition evaluates to a garbage value
# 3130| *host_ptr = parse_hostspec(s + strlen(URL_PREFIX), &path, port_ptr);
# 3131| if (*host_ptr) {
# 3132|-> if (!*port_ptr)
# 3133| *port_ptr = -1; /* -1 indicates they want the default */
# 3134| return path;
Error: CLANG_WARNING: [#def61]
rsync-3.3.0-build/rsync-3.3.0/options.c:3143:19: warning[core.uninitialized.Branch]: Branch condition evaluates to a garbage value
# 3141|
# 3142| if (*path == ':') {
# 3143|-> if (port_ptr && !*port_ptr)
# 3144| *port_ptr = -1;
# 3145| return path + 1;
Error: CPPCHECK_WARNING: [#def62]
rsync-3.3.0-build/rsync-3.3.0/params.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def63]
rsync-3.3.0-build/rsync-3.3.0/pipe.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-775): [#def64]
rsync-3.3.0-build/rsync-3.3.0/pipe.c: scope_hint: In function ‘piped_child’
rsync-3.3.0-build/rsync-3.3.0/pipe.c:69:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(to_child_pipe[0], 0)’
# 67|
# 68| if (pid == 0) {
# 69|-> if (dup2(to_child_pipe[0], STDIN_FILENO) < 0
# 70| || close(to_child_pipe[1]) < 0
# 71| || close(from_child_pipe[0]) < 0
Error: GCC_ANALYZER_WARNING (CWE-775): [#def65]
rsync-3.3.0-build/rsync-3.3.0/pipe.c:72:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(from_child_pipe[1], 1)’
# 70| || close(to_child_pipe[1]) < 0
# 71| || close(from_child_pipe[0]) < 0
# 72|-> || dup2(from_child_pipe[1], STDOUT_FILENO) < 0) {
# 73| rsyserr(FERROR, errno, "Failed to dup/close");
# 74| exit_cleanup(RERR_IPC);
Error: GCC_ANALYZER_WARNING (CWE-775): [#def66]
rsync-3.3.0-build/rsync-3.3.0/pipe.c: scope_hint: In function ‘local_child’
rsync-3.3.0-build/rsync-3.3.0/pipe.c:152:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(to_child_pipe[0], 0)’
rsync-3.3.0-build/rsync-3.3.0/rsync.h:533: included_from: Included from here.
rsync-3.3.0-build/rsync-3.3.0/pipe.c:23: included_from: Included from here.
# 150| }
# 151|
# 152|-> if (dup2(to_child_pipe[0], STDIN_FILENO) < 0
# 153| || close(to_child_pipe[1]) < 0
# 154| || close(from_child_pipe[0]) < 0
Error: GCC_ANALYZER_WARNING (CWE-775): [#def67]
rsync-3.3.0-build/rsync-3.3.0/pipe.c:155:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(from_child_pipe[1], 1)’
# 153| || close(to_child_pipe[1]) < 0
# 154| || close(from_child_pipe[0]) < 0
# 155|-> || dup2(from_child_pipe[1], STDOUT_FILENO) < 0) {
# 156| rsyserr(FERROR, errno, "Failed to dup/close");
# 157| exit_cleanup(RERR_IPC);
Error: CPPCHECK_WARNING: [#def68]
rsync-3.3.0-build/rsync-3.3.0/progress.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def69]
rsync-3.3.0-build/rsync-3.3.0/receiver.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: COMPILER_WARNING (CWE-457): [#def70]
rsync-3.3.0-build/rsync-3.3.0/receiver.c: scope_hint: In function ‘receive_data’
rsync-3.3.0-build/rsync-3.3.0/receiver.c:249:15: warning[-Wmaybe-uninitialized]: ‘data’ may be used uninitialized
# 249 | char *data;
# | ^
# 247| OFF_T offset = 0;
# 248| OFF_T offset2;
# 249|-> char *data;
# 250| int32 i;
# 251| char *map = NULL;
Error: COMPILER_WARNING (CWE-563): [#def71]
rsync-3.3.0-build/rsync-3.3.0/rounding.c:35:20: warning[-Wunused-but-set-variable]: variable ‘test_array’ set but not used
# 33| int main(UNUSED(int argc), UNUSED(char *argv[]))
# 34| {
# 35|-> static int test_array[1 - 2 * (ACTUAL_SIZE != EXPECTED_SIZE)];
# 36| test_array[0] = 0;
# 37| return 0;
Error: CPPCHECK_WARNING (CWE-823): [#def72]
rsync-3.3.0-build/rsync-3.3.0/rounding.c:36: error[arrayIndexOutOfBounds]: Array 'test_array[-1]' accessed at index 0, which is out of bounds.
# 34| {
# 35| static int test_array[1 - 2 * (ACTUAL_SIZE != EXPECTED_SIZE)];
# 36|-> test_array[0] = 0;
# 37| return 0;
# 38| }
Error: CPPCHECK_WARNING: [#def73]
rsync-3.3.0-build/rsync-3.3.0/rsync.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING (CWE-457): [#def74]
rsync-3.3.0-build/rsync-3.3.0/rsync.c:519: warning[uninitvar]: Uninitialized variable: *sxp
# 517|
# 518| #ifdef SUPPORT_ACLS
# 519|-> if (preserve_acls && !S_ISLNK(file->mode) && !ACL_READY(*sxp))
# 520| get_acl(fname, sxp);
# 521| #endif
Error: CPPCHECK_WARNING: [#def75]
rsync-3.3.0-build/rsync-3.3.0/sender.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: COMPILER_WARNING (CWE-1164): [#def76]
rsync-3.3.0-build/rsync-3.3.0/simd-checksum-x86_64.cpp:92:52: warning[-Wunused-function]: ‘int32_t get_checksum1_sse2_32(signed char*, int32_t, int32_t, uint32_t*, uint32_t*)’ defined but not used
# 92 | __attribute__ ((target("default"))) MVSTATIC int32 get_checksum1_sse2_32(schar* buf, int32 len, int32 i, uint32* ps1, uint32* ps2) { return i; }
# | ^~~~~~~~~~~~~~~~~~~~~
# 90| #endif
# 91| __attribute__ ((target("default"))) MVSTATIC int32 get_checksum1_ssse3_32(schar* buf, int32 len, int32 i, uint32* ps1, uint32* ps2) { return i; }
# 92|-> __attribute__ ((target("default"))) MVSTATIC int32 get_checksum1_sse2_32(schar* buf, int32 len, int32 i, uint32* ps1, uint32* ps2) { return i; }
# 93|
# 94| /*
Error: CLANG_WARNING: [#def77]
rsync-3.3.0-build/rsync-3.3.0/simd-checksum-x86_64.cpp:477:5: warning[deadcode.DeadStores]: Value stored to 'i' is never read
# 475|
# 476| // whatever is left
# 477|-> i = get_checksum1_default_1((schar*)buf1, len, i, &s1, &s2);
# 478|
# 479| return (s1 & 0xffff) + (s2 << 16);
Error: CPPCHECK_WARNING: [#def78]
rsync-3.3.0-build/rsync-3.3.0/socket.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def79]
rsync-3.3.0-build/rsync-3.3.0/socket.c:748:18: warning[deadcode.DeadStores]: Although the value stored to 'listener' is used in the enclosing expression, the value is never actually read from 'listener'
# 746| int connect_done = 0;
# 747|
# 748|-> fd[0] = fd[1] = listener = -1;
# 749|
# 750| memset(&sock, 0, sizeof sock);
Error: CPPCHECK_WARNING: [#def80]
rsync-3.3.0-build/rsync-3.3.0/token.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def81]
rsync-3.3.0-build/rsync-3.3.0/uidlist.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def82]
rsync-3.3.0-build/rsync-3.3.0/usage.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def83]
rsync-3.3.0-build/rsync-3.3.0/util1.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def84]
rsync-3.3.0-build/rsync-3.3.0/util1.c:510:12: warning[deadcode.DeadStores]: Although the value stored to 'rc' is used in the enclosing expression, the value is never actually read from 'rc'
# 508| if (++counter >= MAX_RENAMES)
# 509| counter = 1;
# 510|-> } while ((rc = access(path, 0)) == 0 && counter != start);
# 511|
# 512| if (INFO_GTE(MISC, 1)) {
Error: CPPCHECK_WARNING: [#def85]
rsync-3.3.0-build/rsync-3.3.0/xattrs.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def86]
rsync-3.3.0-build/rsync-3.3.0/xattrs.c:999:19: warning[deadcode.DeadStores]: Although the value stored to 'name' is used in the enclosing expression, the value is never actually read from 'name'
# 997| free(rxas[i].datum);
# 998|
# 999|-> rxas[i].name = name = ptr + len;
# 1000| rxas[i].datum = ptr;
# 1001| continue;
Error: CLANG_WARNING: [#def87]
rsync-3.3.0-build/rsync-3.3.0/xattrs.c:1141:3: warning[deadcode.DeadStores]: Value stored to 'fd' is never read
# 1139| xst = fst;
# 1140| if (fname) {
# 1141|-> fd = -1;
# 1142| len = sys_lgetxattr(fname, XSTAT_ATTR, buf, sizeof buf - 1);
# 1143| } else {
Error: CLANG_WARNING: [#def88]
rsync-3.3.0-build/rsync-3.3.0/xattrs.c:1230:42: warning[core.UndefinedBinaryOperatorResult]: The left operand of '!=' is a garbage value
# 1228| }
# 1229|
# 1230|-> if (xst.st_mode != fmode || xst.st_rdev != rdev
# 1231| || xst.st_uid != F_OWNER(file) || xst.st_gid != F_GROUP(file)) {
# 1232| char buf[256];
Error: CPPCHECK_WARNING: [#def89]
rsync-3.3.0-build/rsync-3.3.0/zlib/deflate.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def90]
rsync-3.3.0-build/rsync-3.3.0/zlib/inflate.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING (CWE-457): [#def91]
rsync-3.3.0-build/rsync-3.3.0/zlib/inflate.c:1425: warning[uninitvar]: Uninitialized variable: buf
# 1423| }
# 1424| state->have = 0;
# 1425|-> syncsearch(&(state->have), buf, len);
# 1426| }
# 1427|
Error: CPPCHECK_WARNING: [#def92]
rsync-3.3.0-build/rsync-3.3.0/zlib/inftrees.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def93]
rsync-3.3.0-build/rsync-3.3.0/zlib/trees.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Scan Properties
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 |
enabled-plugins | clang, cppcheck, gcc, shellcheck |
exit-code | 0 |
host | ip-172-16-1-66.us-west-2.compute.internal |
mock-config | fedora-41-x86_64 |
project-name | rsync-3.3.0-2.fc41 |
store-results-to | /tmp/tmpeunxxshd/rsync-3.3.0-2.fc41.tar.xz |
time-created | 2024-07-03 17:52:59 |
time-finished | 2024-07-03 17:55:04 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpeunxxshd/rsync-3.3.0-2.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpeunxxshd/rsync-3.3.0-2.fc41.src.rpm' |
tool-version | csmock-3.5.3-1.el9 |