diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2023-04-17 13:49:20 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2023-04-17 14:34:51 (EDT) |
commit | e821204c4d9e9eb46ef573e5ec8548dee37ea5bf (patch) | |
tree | ad0e2e55594da8435b2e7eb949162531c779472f | |
parent | a213386d08eda39be0d3786d5e9c838626b4e823 (diff) |
Revert "ustar: Verify full magic field"
This reverts commit 1203f44aa85a88cfdc3008e7f14818c85bfe46c3.
POSIX requires "ustar\0" but BusyBox tar creates "ustar ". Again,
standard? What standard?
-rw-r--r-- | src/ustar.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ustar.c b/src/ustar.c index 989794b..c183560 100644 --- a/src/ustar.c +++ b/src/ustar.c @@ -93,7 +93,7 @@ _opkg_opk_ustar_next(struct opkg_opk_ustar *ustar, return OPKG_OPK_END; } - if (memcmp(header->magic, "ustar\0", sizeof(header->magic)) != 0) { + if (memcmp(header->magic, "ustar", strlen("ustar")) != 0) { return OPKG_OPK_ERROR; } |