diff options
author | Timo Teräs <timo.teras@iki.fi> | 2013-09-20 21:51:57 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2013-09-20 21:51:57 +0300 |
commit | 73820e4a3e63f9631bc3b25e69743f13c3b4846e (patch) | |
tree | ccb49373a44880934cd43328c99b04da75cb032f | |
parent | cecb810746113a57ac65236495014fd4aa43982b (diff) | |
download | apk-tools-73820e4a3e63f9631bc3b25e69743f13c3b4846e.tar.gz apk-tools-73820e4a3e63f9631bc3b25e69743f13c3b4846e.tar.bz2 apk-tools-73820e4a3e63f9631bc3b25e69743f13c3b4846e.tar.xz apk-tools-73820e4a3e63f9631bc3b25e69743f13c3b4846e.zip |
archive: fix handling of name lengths of exactly 100 bytes
-rw-r--r-- | src/archive.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/archive.c b/src/archive.c index 771e548..66b4870 100644 --- a/src/archive.c +++ b/src/archive.c @@ -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; |