summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2023-04-17 13:49:00 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2023-04-17 14:34:51 (EDT)
commita213386d08eda39be0d3786d5e9c838626b4e823 (patch)
treedda6adba87fed09126523612465dfba3c6b77acb /src
parentd0ae83756157ad4603fe56809374ae4cbaa6405a (diff)
ustar: Verify full magic field
Diffstat (limited to 'src')
-rw-r--r--src/ustar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ustar.c b/src/ustar.c
index c183560..989794b 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", strlen("ustar")) != 0) {
+ if (memcmp(header->magic, "ustar\0", sizeof(header->magic)) != 0) {
return OPKG_OPK_ERROR;
}