[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-cpio] GNU cpio: problem with tar.c/to_oct() function
From: |
Anatoly A. Orehovsky |
Subject: |
[Bug-cpio] GNU cpio: problem with tar.c/to_oct() function |
Date: |
Tue, 27 Jan 2004 14:59:33 +0300 (MSK) |
Background: cpio is a popular archiving utility in the UNIX and
UNIX-like world at least. Many UNIX-like distributions (Linux, FreeBSD
etc.) contains GNU version of cpio.
Problem: Since 10 Jan 2004 13:37:04 GMT (10000000000 in octal) GNU cpio
keeps the wrong file modification time (back in the 1970 year) in tar
archives (-Htar command line option).
Bug: tar.c/to_oct() function have unneeded code and it puts additional
trailing space char in octal fields of tar header (and octal time value
don't fit in the time field now).
Patch (cpio-2.5):
--- cpio-2.5/tar.c.orig Thu Dec 6 07:55:34 2001
+++ cpio-2.5/tar.c Tue Jan 27 14:14:12 2004
@@ -431,7 +431,7 @@ to_oct (value, digits, where)
register char *where;
{
--digits; /* Leave the trailing NUL slot alone. */
- where[--digits] = ' '; /* Put in the space, though. */
+/* where[--digits] = ' ';*/ /* Put in the space, though. */
/* Produce the digits -- at least one. */
do
--
Anatoly A. Orehovsky. AO9-RIPE. AAO1-RIPN
- [Bug-cpio] GNU cpio: problem with tar.c/to_oct() function,
Anatoly A. Orehovsky <=