bug-cpio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-cpio] bug in cpio


From: Jack Bailey
Subject: [Bug-cpio] bug in cpio
Date: Sun, 10 Jun 2007 23:06:47 -0700
User-agent: Thunderbird 2.0.0.0 (Windows/20070326)

This is a bug report for cpio-2.7.

On CentOS 4.5, readlink does not null-terminate its return string, so the names of symlinks are sometimes archived with trailing junk. This simple patch seems to fix it.

*** ./src/copyout.c~    Wed Sep 27 01:19:44 2006
--- ./src/copyout.c     Sun Jun 10 22:56:23 2007
***************
*** 806,811 ****
--- 806,812 ----
                   free (link_name);
                   continue;
                 }
+               link_name[link_size] = '\0';
               cpio_safer_name_suffix (link_name, false,
                                       !no_abs_paths_flag, true);
               link_size = strlen (link_name);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]