Commit 73820e4a authored by Timo Teräs's avatar Timo Teräs

archive: fix handling of name lengths of exactly 100 bytes

parent cecb8107
......@@ -158,6 +158,9 @@ int apk_tar_parse(struct apk_istream *is, apk_archive_entry_parser parser,
};
teis.csum = NULL;
buf.mode[0] = 0; /* to nul terminate 100-byte buf.name */
buf.magic[0] = 0; /* to nul terminate 100-byte buf.linkname */
if (memcmp(di->id, "APK2", 4) == 0 &&
di->size <= sizeof(entry.csum.data)) {
entry.csum.type = di->size;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment