diff options
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/unarchive.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libbb/unarchive.c b/libbb/unarchive.c index 80dddb2..852bd06 100644 --- a/libbb/unarchive.c +++ b/libbb/unarchive.c @@ -102,6 +102,7 @@ char *extract_archive(FILE *src_stream, FILE *out_stream, const file_header_t *f if (S_ISREG(file_entry->mode)) { buffer = (char *) xmalloc(file_entry->size + 1); fread(buffer, 1, file_entry->size, src_stream); + buffer[file_entry->size] = '\0'; archive_offset += file_entry->size; return(buffer); } |