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.

Files changed (3) hide show
  1. data/ext/zip_crypt.c +5 -1
  2. data/ext/zipruby.h +1 -1
  3. 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
@@ -1,7 +1,7 @@
1
1
  #ifndef __ZIPRUBY_H__
2
2
  #define __ZIPRUBY_H__
3
3
 
4
- #define VERSION "0.2.0"
4
+ #define VERSION "0.2.1"
5
5
  #define ERRSTR_BUFSIZE 256
6
6
  #define DATA_BUFSIZE 8192
7
7
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zipruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - winebarrel