bugGNU cpio - Bugs: bug #23863, copyout can truncate ino numbers...

 
 

bug #23863: copyout can truncate ino numbers for hardlinks

Submitter:  None
Submitted:  Wed 16 Jul 2008 04:01:33 AM UTC
Votes: 1
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 27 Apr 2010 10:48:56 AM UTC, comment #2: 

I stumbled over this problem too in Ubuntu 10.04 which is too be released soon and I'm curious why the patch available here:
 http://www.mail-archive.com/bug-cpio@gnu.org/msg00307.html
has not been applied.

Peter Funk <pefu>
Wed 16 Jul 2008 04:02:49 AM UTC, comment #1: 

(jfbeam - gmail.com, btw)

Anonymous
Wed 16 Jul 2008 04:01:33 AM UTC, original submission:  

copy{in,out}.c has a number of places where new_cpio_header fields become signed/truncated.  For example:
 count_defered_links_to_dev_ino (struct new_cpio_header *)
 {
   int  ino;
   ...
   ino = file_hdr->c_ino;

new_cpio_header's c_ino is of type "unsigned long".  Converting to an "int" will destroy large inode numbers and throughly confuse the process of archiving hardlinks.

I wondered why my archives were suddenly 20MB smaller.  It's because there are hundreds of zero byte hardlinks.  Nice.

I can provide a patch, but it's made for RHEL4 (CentOS).

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gray (Updated the item)
  • -email is unavailable- added by pefu (Voted in favor of this item)
  • -email is unavailable- added by pefu (Posted a comment)
  •  

    There is 1 vote so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-04-28 gray StatusNone Fixed
        Open/ClosedOpen Closed
    2010-04-27 pefu Carbon-Copy- Added pefu

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code