X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/eb7715c1eb5a69a934fe59e1ccafe3b421b9c8fd..68ddbaf6457ebaa218587d1a4f9eb90f521174fc:/flist.c diff --git a/flist.c b/flist.c index 69cfec14..81fa2de6 100644 --- a/flist.c +++ b/flist.c @@ -351,7 +351,7 @@ static void send_file_entry(int f, struct file_struct *file, int ndx, int first_ static uint32 rdev_major; static uid_t uid; static gid_t gid; - static char *user_name, *group_name; + static const char *user_name, *group_name; static char lastname[MAXPATHLEN]; char fname[MAXPATHLEN]; int first_hlink_ndx = -1; @@ -1830,7 +1830,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[]) } else if (!len || fbuf[len - 1] == '/') { if (len == 2 && fbuf[0] == '.') { /* Turn "./" into just "." rather than "./." */ - fbuf[1] = '\0'; + fbuf[--len] = '\0'; } else { if (len + 1 >= MAXPATHLEN) overflow_exit("send_file_list");