mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-05-10 07:53:45 -04:00
Read a 4-byte mtime as unsigned (old-protocol).
When conversing with a protocol 29 or earlier rsync, the modtime values are arriving as 4-byte integers. This change interprets these short values as unsigned integers, allowing the time that can be conveyed to range from 1-Jan-1970 to 7-Feb-2106 instead of the signed range of 13-Dec-1901 to 19-Jan-2038. Given that we are fast approaching 2038, any old-protocol transfers will be better served using the unsigned range rather than the signed. It is important to keep in mind that protocol 30 & 31 convey the full 8-byte mtime value (plus nanoseconds), allowing for a huge span of time that is not affected by this change.
This commit is contained in:
2
flist.c
2
flist.c
@@ -836,7 +836,7 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
|
||||
}
|
||||
#endif
|
||||
} else
|
||||
modtime = read_int(f);
|
||||
modtime = read_uint(f);
|
||||
}
|
||||
if (xflags & XMIT_MOD_NSEC)
|
||||
#ifndef CAN_SET_NSEC
|
||||
|
||||
Reference in New Issue
Block a user