zipruby 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of zipruby might be problematic. Click here for more details.
- data/ext/zip_crypt.c +5 -1
- data/ext/zipruby.h +1 -1
- metadata +1 -1
data/ext/zip_crypt.c
CHANGED
@@ -188,8 +188,12 @@ static int _zip_crypt(struct zip *za, const char *pwd, int pwdlen, int decrypt,
|
|
188
188
|
}
|
189
189
|
|
190
190
|
memcpy(cd->entry + i, za->cdir->entry + i, sizeof(cd->entry[i]));
|
191
|
-
cd->entry[i].offset = ftello(out);
|
192
191
|
|
192
|
+
if (cd->entry[i].bitflags & ZIP_GPBF_DATA_DESCRIPTOR) {
|
193
|
+
cd->entry[i].bitflags &= ~ZIP_GPBF_DATA_DESCRIPTOR;
|
194
|
+
}
|
195
|
+
|
196
|
+
cd->entry[i].offset = ftello(out);
|
193
197
|
encrypted = de.bitflags & ZIP_GPBF_ENCRYPTED;
|
194
198
|
|
195
199
|
if (decrypt && encrypted) {
|
data/ext/zipruby.h
CHANGED