diff options
Diffstat (limited to 'src')
-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; |