mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-05-14 09:55:51 -04:00
get byte order of checksum seed right
This commit is contained in:
@@ -67,7 +67,7 @@ void get_checksum2(char *buf,int len,char *sum)
|
||||
|
||||
if (len > len1) {
|
||||
if (buf1) free(buf1);
|
||||
buf1 = (char *)malloc(len+sizeof(checksum_seed));
|
||||
buf1 = (char *)malloc(len+4);
|
||||
len1 = len;
|
||||
if (!buf1) out_of_memory("get_checksum2");
|
||||
}
|
||||
@@ -76,8 +76,8 @@ void get_checksum2(char *buf,int len,char *sum)
|
||||
|
||||
bcopy(buf,buf1,len);
|
||||
if (checksum_seed) {
|
||||
bcopy((char *)&checksum_seed,buf1+len,sizeof(checksum_seed));
|
||||
len += sizeof(checksum_seed);
|
||||
SIVAL(buf1,len,checksum_seed);
|
||||
len += 4;
|
||||
}
|
||||
|
||||
for(i = 0; i + CSUM_CHUNK <= len; i += CSUM_CHUNK) {
|
||||
|
||||
Reference in New Issue
Block a user