aboutsummaryrefslogtreecommitdiff
path: root/src/common/unzip.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/unzip.c')
-rw-r--r--src/common/unzip.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/common/unzip.c b/src/common/unzip.c
index a13f129..46683f0 100644
--- a/src/common/unzip.c
+++ b/src/common/unzip.c
@@ -534,11 +534,11 @@ dos_date_to_tmu_date (uLong ulDosDate,
534 * @param pfile_info file information to initialize 534 * @param pfile_info file information to initialize
535 * @param pfile_info_internal internal file information to initialize 535 * @param pfile_info_internal internal file information to initialize
536 * @param szFileName where to write the name of the current file 536 * @param szFileName where to write the name of the current file
537 * @param fileNameBufferSize number of bytes available in szFileName 537 * @param fileNameBufferSize number of bytes available in @a szFileName
538 * @param extraField where to write extra data 538 * @param extraField where to write extra data
539 * @param extraFieldBufferSize number of bytes available in extraField 539 * @param extraFieldBufferSize number of bytes available in extraField
540 * @param szComment where to write the comment on the current file 540 * @param szComment where to write the comment on the current file
541 * @param commentBufferSize number of bytes available in szComment 541 * @param commentBufferSize number of bytes available in @a szComment
542 * @return #EXTRACTOR_UNZIP_OK if there is no problem. 542 * @return #EXTRACTOR_UNZIP_OK if there is no problem.
543 */ 543 */
544static int 544static int
@@ -664,7 +664,10 @@ get_current_file_info (struct EXTRACTOR_UnzipFile *file,
664 uSizeRead = file_info.size_file_comment; 664 uSizeRead = file_info.size_file_comment;
665 } 665 }
666 else 666 else
667 uSizeRead = commentBufferSize; 667 {
668 *(szComment+commentBufferSize - 1) = '\0';
669 uSizeRead = commentBufferSize - 1;
670 }
668 671
669 if (0 != lSeek) 672 if (0 != lSeek)
670 { 673 {