Article View: gnu.utils.bug
Article #1105(none)
From: David A Oshinsky
Date: Mon, 16 Nov 1992 22:03
Date: Mon, 16 Nov 1992 22:03
33 lines
1667 bytes
1667 bytes
This is to report a bug in gnu cpio version 2.1. The bug is as follows: When gnu cpio 2.1 reads an old-style (short header) binary cpio file, it does not read the proper c_dev and c_ino fields into the new cpio header. This can cause serious problems since cpio bases the decision to create hard links (for those files with nlinks > 1) on the values of the c_ino field. The following patch, when applied to copyin.c, fixes the bug (changes are made in the read_in_binary() function): 217c217 < number), which are already filled in. */ --- > number), which are already filled in. 218a219,223 > Note AT&T DAO 11/16/92: above comment is inaccurate since the first 6 > bytes of the short binary header includes the magic number, device number, > and the inode number (not just the magic number !!!!). > */ > 241a247,251 > > /* AT&T DAO 11/16/92 to fix a SERIOUS bug: initialize c_dev and */ > /* c_ino fields of short_hdr (from bytes 3 through 6 of file_hdr) !!! */ > short_hdr.c_dev = ((struct old_cpio_header *)file_hdr)->c_dev; > short_hdr.c_ino = ((struct old_cpio_header *)file_hdr)->c_ino; David Oshinsky AT&T uucp: att!abars!dao phone: (908)870-7693
Technical Details
Message-ID:
<9211162206.AA28646@life.ai.mit.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!agate!spool.mu.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!abars.ATt.COM!daoShow Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!agate!spool.mu.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!abars.ATt.COM!dao From: dao@abars.ATt.COM (David A Oshinsky) Subject: (none) Message-ID: <9211162206.AA28646@life.ai.mit.edu> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Mon, 16 Nov 1992 22:03:37 GMT Approved: bug-gnu-utils@prep.ai.mit.edu Lines: 34