Make sure there is a trailing '\0' when extracting to buffer.
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 @@
 		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);
 		}