mirror of
https://github.com/ipxe/ipxe
synced 2026-02-03 14:39:27 +03:00
[cpio] Fix calculation of name lengths in CPIO headers
Commit 12ea8c4 ("[cpio] Allow for construction of parent directories
as needed") introduced a regression in constructing CPIO archive
headers for relative paths (e.g. simple filenames with no leading
slash).
Fix by counting the number of path components rather than the number
of path separators, and add some test cases to cover CPIO header
construction.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -89,3 +89,4 @@ REQUIRE_OBJECT ( editstring_test );
|
||||
REQUIRE_OBJECT ( p256_test );
|
||||
REQUIRE_OBJECT ( p384_test );
|
||||
REQUIRE_OBJECT ( efi_siglist_test );
|
||||
REQUIRE_OBJECT ( cpio_test );
|
||||
|
||||
Reference in New Issue
Block a user