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



_______________________________________________
Bug-cpio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-cpio

Reply via email to