bug-cpio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-cpio] cpio: checksum error on 64-bit machines


From: Jim Castleberry
Subject: Re: [Bug-cpio] cpio: checksum error on 64-bit machines
Date: Wed, 26 Oct 2005 10:58:07 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915

Peter Vrabec at Redhat found that my patch was incomplete:
------- Additional Comments From address@hidden  2005-10-26 06:55 EST -------
Your patch did not help me. Problem still persists.

cpio: OOo_2.0.0_LinuxIntel_install.tar.gz: checksum error (0x332bf3b47, should
be 0x32bf3b47)

It's because:
copyin.c:1585 if (crc != file_hdr.c_chksum)
crc is unsigned long and file_hdr.c_chksum is truncated by your patch.

His corrected patch is attached.

The Redhat bug id for this issue is 171649.
The Debian bug id is 335580.

Jim

--- cpio-2.6/src/copyout.c.orig 2004-10-14 03:14:03.000000000 -0600
+++ cpio-2.6/src/copyout.c      2005-10-24 12:28:43.832281758 -0600
@@ -311,7 +311,7 @@
               file_hdr->c_gid, file_hdr->c_nlink, file_hdr->c_mtime,
             file_hdr->c_filesize, file_hdr->c_dev_maj, file_hdr->c_dev_min,
           file_hdr->c_rdev_maj, file_hdr->c_rdev_min, file_hdr->c_namesize,
-              file_hdr->c_chksum);
+              file_hdr->c_chksum & 0xffffffff);
       tape_buffered_write (ascii_header, out_des, 110L);
 
       /* Write file name to output.  */


reply via email to

[Prev in Thread] Current Thread [Next in Thread]