X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/b3b326016a4d29fea20d97e782f1af05542aca22..9decb4d2ef51599425f12a68dbeba2b4f3a2d908:/rsync.c diff --git a/rsync.c b/rsync.c index 3c802867..fbe18c7c 100644 --- a/rsync.c +++ b/rsync.c @@ -162,12 +162,12 @@ int read_ndx_and_attrs(int f_in, int *iflag_ptr, uchar *type_ptr, continue; } ndx = NDX_FLIST_OFFSET - ndx; - if (ndx < 0 || ndx >= dir_flist->count) { + if (ndx < 0 || ndx >= dir_flist->used) { ndx = NDX_FLIST_OFFSET - ndx; rprintf(FERROR, "[%s] Invalid dir index: %d (%d - %d)\n", who_am_i(), ndx, NDX_FLIST_OFFSET, - NDX_FLIST_OFFSET - dir_flist->count + 1); + NDX_FLIST_OFFSET - dir_flist->used + 1); exit_cleanup(RERR_PROTOCOL); } @@ -188,7 +188,7 @@ int read_ndx_and_attrs(int f_in, int *iflag_ptr, uchar *type_ptr, /* Honor the old-style keep-alive indicator. */ if (protocol_version < 30 - && ndx == cur_flist->count && iflags == ITEM_IS_NEW) { + && ndx == cur_flist->used && iflags == ITEM_IS_NEW) { if (am_sender) maybe_send_keepalive(); goto read_loop; @@ -200,7 +200,7 @@ int read_ndx_and_attrs(int f_in, int *iflag_ptr, uchar *type_ptr, "Invalid file index: %d (%d - %d) with iflags %x [%s]\n", ndx, first_flist->ndx_start + first_flist->ndx_start, first_flist->prev->ndx_start + first_flist->ndx_start - + first_flist->prev->count - 1, iflags, who_am_i()); + + first_flist->prev->used - 1, iflags, who_am_i()); exit_cleanup(RERR_PROTOCOL); } cur_flist = flist; @@ -500,7 +500,7 @@ struct file_list *flist_for_ndx(int ndx) return NULL; flist = flist->prev; } - while (ndx >= flist->ndx_start + flist->count) { + while (ndx >= flist->ndx_start + flist->used) { if (!(flist = flist->next)) return NULL; }