cpio: fix unpacking of names with leading slashes

function                                             old     new   delta
get_header_cpio                                      968     990     +22
cpio_main                                            533     526      -7

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2010-01-05 04:43:21 +01:00
parent 074e8dcba7
commit af1c8e8be0
3 changed files with 13 additions and 2 deletions

View File

@@ -364,7 +364,7 @@ int cpio_main(int argc UNUSED_PARAM, char **argv)
#endif
archive_handle = init_handle();
archive_handle->src_fd = STDIN_FILENO;
/* archive_handle->src_fd = STDIN_FILENO; - done by init_handle */
archive_handle->seek = seek_by_read;
archive_handle->ah_flags = ARCHIVE_EXTRACT_NEWER;