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


bug #23863: copyout can truncate ino numbers for hardlinks

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

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


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:
has not been applied.

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

(jfbeam - gmail.com, btw)

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).



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

Attach Files:

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 pefu (Voted in favor of this item)
  • -email is unavailable- added by pefu (Posted a comment)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 1 encouragement so far.

    Only logged-in users can vote.




    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-04-27 pefu Carbon-Copy- => Added pefu

    Back to the top

    Powered by Savane 3.5