get byte order of checksum seed right

This commit is contained in:
Andrew Tridgell
1996-06-30 05:02:45 +00:00
parent d7b305fd91
commit 57e877a16d

View File

@@ -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) {