"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/common/unzip.c" between
libextractor-1.7.tar.gz and libextractor-1.8.tar.gz

About: GNU libextractor is a library used to extract meta-data from files of arbitrary type.

unzip.c  (libextractor-1.7):unzip.c  (libextractor-1.8)
skipping to change at line 522 skipping to change at line 522
} }
/** /**
* Write info about the ZipFile in the *pglobal_info structure. * Write info about the ZipFile in the *pglobal_info structure.
* No preparation of the structure is needed. * No preparation of the structure is needed.
* *
* @param file zipfile to manipulate * @param file zipfile to manipulate
* @param pfile_info file information to initialize * @param pfile_info file information to initialize
* @param pfile_info_internal internal file information to initialize * @param pfile_info_internal internal file information to initialize
* @param szFileName where to write the name of the current file * @param szFileName where to write the name of the current file
* @param fileNameBufferSize number of bytes available in szFileName * @param fileNameBufferSize number of bytes available in @a szFileName
* @param extraField where to write extra data * @param extraField where to write extra data
* @param extraFieldBufferSize number of bytes available in extraField * @param extraFieldBufferSize number of bytes available in extraField
* @param szComment where to write the comment on the current file * @param szComment where to write the comment on the current file
* @param commentBufferSize number of bytes available in szComment * @param commentBufferSize number of bytes available in @a szComment
* @return #EXTRACTOR_UNZIP_OK if there is no problem. * @return #EXTRACTOR_UNZIP_OK if there is no problem.
*/ */
static int static int
get_current_file_info (struct EXTRACTOR_UnzipFile *file, get_current_file_info (struct EXTRACTOR_UnzipFile *file,
struct EXTRACTOR_UnzipFileInfo *pfile_info, struct EXTRACTOR_UnzipFileInfo *pfile_info,
struct UnzipFileInfoInternal *pfile_info_internal, struct UnzipFileInfoInternal *pfile_info_internal,
char *szFileName, char *szFileName,
uLong fileNameBufferSize, uLong fileNameBufferSize,
void *extraField, void *extraField,
uLong extraFieldBufferSize, uLong extraFieldBufferSize,
skipping to change at line 652 skipping to change at line 652
if (NULL != szComment) if (NULL != szComment)
{ {
uLong uSizeRead; uLong uSizeRead;
if (file_info.size_file_comment < commentBufferSize) if (file_info.size_file_comment < commentBufferSize)
{ {
*(szComment+file_info.size_file_comment) = '\0'; *(szComment+file_info.size_file_comment) = '\0';
uSizeRead = file_info.size_file_comment; uSizeRead = file_info.size_file_comment;
} }
else else
uSizeRead = commentBufferSize; {
*(szComment+commentBufferSize - 1) = '\0';
uSizeRead = commentBufferSize - 1;
}
if (0 != lSeek) if (0 != lSeek)
{ {
if (0 == ZSEEK (file->z_filefunc, lSeek, SEEK_CUR)) if (0 == ZSEEK (file->z_filefunc, lSeek, SEEK_CUR))
lSeek = 0; lSeek = 0;
else else
return EXTRACTOR_UNZIP_ERRNO; return EXTRACTOR_UNZIP_ERRNO;
} }
if ( (file_info.size_file_comment > 0) && if ( (file_info.size_file_comment > 0) &&
(commentBufferSize > 0) && (commentBufferSize > 0) &&
 End of changes. 3 change blocks. 
3 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)