Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

zip issue introduced in 1.5.4

  • Loading branch information...
commit 2fe2ee64c230165b05dd62a7a37d15bce13972ee 1 parent 4ac4f35
@geometer authored
View
3  AndroidManifest.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.geometerplus.zlibrary.ui.android" android:versionCode="105041" android:versionName="1.5.4" android:installLocation="auto">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.geometerplus.zlibrary.ui.android" android:versionCode="105051" android:versionName="1.5.5" android:installLocation="auto">
<uses-sdk android:minSdkVersion="5" android:maxSdkVersion="10"/>
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:anyDensity="true"/>
<uses-permission android:name="android.permission.INTERNET"/>
@@ -90,6 +90,7 @@
<data android:mimeType="application/x-mobipocket-ebook"/>
<data android:mimeType="application/x-fictionbook+xml"/>
<data android:mimeType="application/x-fictionbook"/>
+ <data android:mimeType="text/plain"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEARCH"/>
View
5 ChangeLog
@@ -1,6 +1,9 @@
-===== 1.5.5 (Jun ??, 2012) =====
+===== 1.5.6 (Jun ??, 2012) =====
* More API methods
+===== 1.5.5 (Jun 03, 2012) =====
+* Fixed zip decompression (issue introduced in 1.5.4)
+
===== 1.5.4 (Jun 03, 2012) =====
* Minor issues in zip/ePub files
* fixed file opening from the library
View
2  VERSION
@@ -1 +1 @@
-1.5.4
+1.5.5
View
11 jni/NativeFormats/zlibrary/core/src/filesystem/zip/ZLZDecompressor.cpp
@@ -17,7 +17,7 @@
* 02110-1301, USA.
*/
-#include <string.h>
+#include <cstring>
#include <algorithm>
@@ -55,20 +55,19 @@ size_t ZLZDecompressor::decompress(ZLInputStream &stream, char *buffer, size_t m
} else {
myAvailableSize = 0;
}
- while (myZStream->avail_in == 0) {
+ if (myZStream->avail_in == 0) {
break;
}
while (myZStream->avail_in > 0) {
myZStream->avail_out = OUT_BUFFER_SIZE;
myZStream->next_out = (Bytef*)myOutBuffer;
int code = ::inflate(myZStream, Z_SYNC_FLUSH);
- if ((code != Z_OK) && (code != Z_STREAM_END)) {
+ if (code != Z_OK && code != Z_STREAM_END) {
break;
}
- if (OUT_BUFFER_SIZE == myZStream->avail_out) {
- break;
+ if (OUT_BUFFER_SIZE != myZStream->avail_out) {
+ myBuffer.append(myOutBuffer, OUT_BUFFER_SIZE - myZStream->avail_out);
}
- myBuffer.append(myOutBuffer, OUT_BUFFER_SIZE - myZStream->avail_out);
if (code == Z_STREAM_END) {
myAvailableSize = 0;
stream.seek(0 - myZStream->avail_in, false);
View
2  jni/NativeFormats/zlibrary/core/src/filesystem/zip/ZLZipHeader.cpp
@@ -87,7 +87,7 @@ void ZLZipHeader::skipEntry(ZLInputStream &stream, ZLZipHeader &header) {
default:
break;
case SignatureLocalFile:
- if ((header.Flags & 0x08) == 0x08 && header.CompressionMethod != 0 && header.CompressedSize != 0) {
+ if ((header.Flags & 0x08) == 0x08 && header.CompressionMethod != 0) {
stream.seek(header.ExtraLength, false);
ZLZDecompressor decompressor((size_t)-1);
size_t size;
Please sign in to comment.
Something went wrong with that request. Please try again.