Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* unzip.c -- IO for uncompress .zip files using zlib | 1 /* unzip.c -- IO for uncompress .zip files using zlib |
| 2 Version 1.1, February 14h, 2010 | 2 Version 1.1, February 14h, 2010 |
| 3 part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) | 3 part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) |
| 4 | 4 |
| 5 Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage. com/zLibDll/minizip.html ) | 5 Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage. com/zLibDll/minizip.html ) |
| 6 | 6 |
| 7 Modifications of Unzip for Zip64 | 7 Modifications of Unzip for Zip64 |
| 8 Copyright (C) 2007-2008 Even Rouault | 8 Copyright (C) 2007-2008 Even Rouault |
| 9 | 9 |
| 10 Modifications for Zip64 support on both zip and unzip | 10 Modifications for Zip64 support on both zip and unzip |
| (...skipping 1687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1698 | 1698 |
| 1699 if ((pfile_in_zip_read_info->read_buffer == NULL)) | 1699 if ((pfile_in_zip_read_info->read_buffer == NULL)) |
| 1700 return UNZ_END_OF_LIST_OF_FILE; | 1700 return UNZ_END_OF_LIST_OF_FILE; |
| 1701 if (len==0) | 1701 if (len==0) |
| 1702 return 0; | 1702 return 0; |
| 1703 | 1703 |
| 1704 pfile_in_zip_read_info->stream.next_out = (Bytef*)buf; | 1704 pfile_in_zip_read_info->stream.next_out = (Bytef*)buf; |
| 1705 | 1705 |
| 1706 pfile_in_zip_read_info->stream.avail_out = (uInt)len; | 1706 pfile_in_zip_read_info->stream.avail_out = (uInt)len; |
| 1707 | 1707 |
| 1708 if ((len>pfile_in_zip_read_info->rest_read_uncompressed) && | |
| 1709 (!(pfile_in_zip_read_info->raw))) | |
| 1710 pfile_in_zip_read_info->stream.avail_out = | |
| 1711 (uInt)pfile_in_zip_read_info->rest_read_uncompressed; | |
|
satorux1
2014/02/26 04:05:47
why was this part removed?
João Eiras
2014/02/26 17:35:38
From the review description
"A bug in unzip.c wa
satorux1
2014/02/27 06:57:00
Is this issue fixed in the upstream? Otherwise, wo
João Eiras
2014/02/27 17:12:17
unzip.c is from the minizip project. I tried to co
| |
| 1712 | |
| 1713 if ((len>pfile_in_zip_read_info->rest_read_compressed+ | 1708 if ((len>pfile_in_zip_read_info->rest_read_compressed+ |
| 1714 pfile_in_zip_read_info->stream.avail_in) && | 1709 pfile_in_zip_read_info->stream.avail_in) && |
| 1715 (pfile_in_zip_read_info->raw)) | 1710 (pfile_in_zip_read_info->raw)) |
| 1716 pfile_in_zip_read_info->stream.avail_out = | 1711 pfile_in_zip_read_info->stream.avail_out = |
| 1717 (uInt)pfile_in_zip_read_info->rest_read_compressed+ | 1712 (uInt)pfile_in_zip_read_info->rest_read_compressed+ |
| 1718 pfile_in_zip_read_info->stream.avail_in; | 1713 pfile_in_zip_read_info->stream.avail_in; |
| 1719 | 1714 |
| 1720 while (pfile_in_zip_read_info->stream.avail_out>0) | 1715 while (pfile_in_zip_read_info->stream.avail_out>0) |
| 1721 { | 1716 { |
| 1722 if ((pfile_in_zip_read_info->stream.avail_in==0) && | 1717 if ((pfile_in_zip_read_info->stream.avail_in==0) && |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2116 &s->cur_file_info_internal, | 2111 &s->cur_file_info_internal, |
| 2117 NULL,0,NULL,0,NULL,0); | 2112 NULL,0,NULL,0,NULL,0); |
| 2118 s->current_file_ok = (err == UNZ_OK); | 2113 s->current_file_ok = (err == UNZ_OK); |
| 2119 return err; | 2114 return err; |
| 2120 } | 2115 } |
| 2121 | 2116 |
| 2122 extern int ZEXPORT unzSetOffset (unzFile file, uLong pos) | 2117 extern int ZEXPORT unzSetOffset (unzFile file, uLong pos) |
| 2123 { | 2118 { |
| 2124 return unzSetOffset64(file,pos); | 2119 return unzSetOffset64(file,pos); |
| 2125 } | 2120 } |
| OLD | NEW |