| 877 | uLong commentBufferSize)); |
| 878 | |
| 879 | local int unz64local_GetCurrentFileInfoInternal (unzFile file, |
| 880 | unz_file_info64 *pfile_info, |
| 881 | unz_file_info64_internal |
| 882 | *pfile_info_internal, |
| 883 | char *szFileName, |
| 884 | uLong fileNameBufferSize, |
| 885 | void *extraField, |
| 886 | uLong extraFieldBufferSize, |
| 887 | char *szComment, |
| 888 | uLong commentBufferSize) |
| 889 | { |
| 890 | unz64_s* s; |
| 891 | unz_file_info64 file_info; |
| 892 | unz_file_info64_internal file_info_internal; |
| 893 | int err=UNZ_OK; |
| 894 | uLong uMagic; |
| 895 | long lSeek=0; |
| 896 | uLong uL; |
| 897 | |
| 898 | if (file==NULL) |
| 899 | return UNZ_PARAMERROR; |
| 900 | s=(unz64_s*)file; |
| 901 | if (ZSEEK64(s->z_filefunc, s->filestream, |
| 902 | s->pos_in_central_dir+s->byte_before_the_zipfile, |
| 903 | ZLIB_FILEFUNC_SEEK_SET)!=0) |
| 904 | err=UNZ_ERRNO; |
| 905 | |
| 906 | |
| 907 | /* we check the magic */ |
| 908 | if (err==UNZ_OK) |
| 909 | { |
| 910 | if (unz64local_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK) |
| 911 | err=UNZ_ERRNO; |
| 912 | else if (uMagic!=0x02014b50) |
| 913 | err=UNZ_BADZIPFILE; |
| 914 | } |
| 915 | |
| 916 | if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.version) != UNZ_OK) |
| 917 | err=UNZ_ERRNO; |
| 918 | |
| 919 | if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.version_needed) != UNZ_OK) |
| 920 | err=UNZ_ERRNO; |
| 921 | |
| 922 | if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.flag) != UNZ_OK) |
| 923 | err=UNZ_ERRNO; |
| 924 | |
| 925 | if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.compression_method) != UNZ_OK) |
| 926 | err=UNZ_ERRNO; |
| 927 | |
| 928 | if (unz64local_getLong(&s->z_filefunc, s->filestream,&file_info.dosDate) != UNZ_OK) |
| 929 | err=UNZ_ERRNO; |
| 930 | |
| 931 | unz64local_DosDateToTmuDate(file_info.dosDate,&file_info.tmu_date); |
| 932 | |
| 933 | if (unz64local_getLong(&s->z_filefunc, s->filestream,&file_info.crc) != UNZ_OK) |
| 934 | err=UNZ_ERRNO; |
| 935 | |
| 936 | if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK) |
no test coverage detected