diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ustar.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ustar.c b/src/ustar.c index c183560..26b581d 100644 --- a/src/ustar.c +++ b/src/ustar.c @@ -96,6 +96,10 @@ _opkg_opk_ustar_next(struct opkg_opk_ustar *ustar, if (memcmp(header->magic, "ustar", strlen("ustar")) != 0) { return OPKG_OPK_ERROR; } + if (memcmp(header->version, "00", strlen("00")) != 0 && + memcmp(header->version, " \0", strlen(" \0")) != 0) { + return OPKG_OPK_ERROR; + } chksum_got = strtol((char *) header->chksum, &end, OPKG_OPK_USTAR_NUM_BASE_); |