The branch, b3.0.x has been updated via 3ef38b0 Avoid adding a slash to path '/'. via 5a1d092 Fix a potential crash when trying to find a better block match. from 1ddcdaf Preparing for release of 3.0.8
;a=shortlog;h=b3.0.x - Log ----------------------------------------------------------------- commit 3ef38b0d1b5efcd857b9e2f7608f288bd0439785 Author: Wayne Davison <way...@samba.org> Date: Fri Apr 22 15:51:55 2011 -0700 Avoid adding a slash to path '/'. commit 5a1d092ae1f184ab5349728587405bacafcd1aaf Author: Wayne Davison <way...@samba.org> Date: Fri Apr 22 11:27:16 2011 -0700 Fix a potential crash when trying to find a better block match. ----------------------------------------------------------------------- Summary of changes: match.c | 2 +- util.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/match.c b/match.c index 658d786..154099d 100644 --- a/match.c +++ b/match.c @@ -238,7 +238,7 @@ static void hash_search(int f,struct sum_struct *s, aligned_offset += s->blength; aligned_i++; } - if (offset == aligned_offset) { + if (offset == aligned_offset && aligned_i < s->count) { if (i != aligned_i) { if (sum != s->sums[aligned_i].sum1 || l != s->sums[aligned_i].len diff --git a/util.c b/util.c index a694fde..2991fd2 100644 --- a/util.c +++ b/util.c @@ -1024,8 +1024,9 @@ int change_dir(const char *dir, int set_path_only) errno = ENAMETOOLONG; return 0; } - curr_dir[curr_dir_len] = '/'; - memcpy(curr_dir + curr_dir_len + 1, dir, len + 1); + if (!(curr_dir_len && curr_dir[curr_dir_len-1] == '/')) + curr_dir[curr_dir_len++] = '/'; + memcpy(curr_dir + curr_dir_len, dir, len + 1); if (!set_path_only && chdir(curr_dir)) { curr_dir[curr_dir_len] = '\0'; -- The rsync repository. _______________________________________________ rsync-cvs mailing list rsync-cvs@lists.samba.org https://lists.samba.org/mailman/listinfo/rsync-cvs