gnu/123921: cpio -oc bug with write_out_header()
Katsuyuki Miyoshi
katsu at miyoshi.matsuyama.ehime.jp
Fri May 23 05:20:01 UTC 2008
>Number: 123921
>Category: gnu
>Synopsis: cpio -oc bug with write_out_header()
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri May 23 05:20:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Katsuyuki Miyoshi
>Release: FreeBSD 8.0-CURRENT i386
>Organization:
Katsuyuki Miyoshi, Ehime, Japan.
>Environment:
System: FreeBSD kmgw.miyoshi.matsuyama.ehime.jp 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Wed May 21 20:18:53 JST 2008 root at kmgw.miyoshi.matsuyama.ehime.jp:/usr/obj/usr/src/sys/KMGW i386
>Description:
cpio cannot use with -c option.
>How-To-Repeat:
% find foo | cpio -oc > foo.cpio
Internal overflow, aborting
>Fix:
--- contrib/cpio/src/copyout.c.org 2006-01-11 21:38:05.000000000 +0900
+++ contrib/cpio/src/copyout.c 2008-05-23 13:27:13.000000000 +0900
@@ -371,7 +371,7 @@ write_out_header (struct new_cpio_header
/* Debian hack: The type of dev_t has changed in glibc. Fixed output
to ensure that a long int is passed to sprintf. This has been
reported to "bug-gnu-utils at prep.ai.mit.edu". (1998/5/26) -BEM */
- snprintf (ascii_header, sizeof(ascii_header),
+ ret = snprintf (ascii_header, sizeof(ascii_header),
"%06ho%06lo%06lo%06lo%06lo%06lo%06lo%06lo%011lo%06lo%011lo",
file_hdr->c_magic & 0xFFFF, (long) dev & 0xFFFF,
file_hdr->c_ino & 0xFFFF, file_hdr->c_mode & 0xFFFF,
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list