summaryrefslogtreecommitdiff
path: root/archival/libarchive/get_header_cpio.c
diff options
context:
space:
mode:
Diffstat (limited to 'archival/libarchive/get_header_cpio.c')
-rw-r--r--archival/libarchive/get_header_cpio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/archival/libarchive/get_header_cpio.c b/archival/libarchive/get_header_cpio.c
index 1a0058b..7861d1f 100644
--- a/archival/libarchive/get_header_cpio.c
+++ b/archival/libarchive/get_header_cpio.c
@@ -37,7 +37,7 @@ char FAST_FUNC get_header_cpio(archive_handle_t *archive_handle)
}
archive_handle->offset += 110;
- if (strncmp(&cpio_header[0], "07070", 5) != 0
+ if (!is_prefixed_with(&cpio_header[0], "07070")
|| (cpio_header[5] != '1' && cpio_header[5] != '2')
) {
bb_error_msg_and_die("unsupported cpio format, use newc or crc");