File tree 4 files changed +15
-6
lines changed
4 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,13 @@ layout: default
4
4
section : main
5
5
---
6
6
7
+ ### v3.5.0 2020 2020-05-31
8
+
9
+ - Fix 'End of data reached' error when file extra field is invalid (see [ #544 ] ( https://github.com/Stuk/jszip/pull/544 ) ).
10
+ - Typescript definitions: Add null to return types of functions that may return null (see [ #669 ] ( https://github.com/Stuk/jszip/pull/669 ) ).
11
+ - Typescript definitions: Correct nodeStream's type (see [ #682 ] ( https://github.com/Stuk/jszip/pull/682 ) )
12
+ - Typescript definitions: Add string output type (see [ #666 ] ( https://github.com/Stuk/jszip/pull/666 ) )
13
+
7
14
### v3.4.0 2020 2020-04-19
8
15
9
16
- Add Typescript type definitions (see [ #601 ] ( https://github.com/Stuk/jszip/pull/601 ) ).
Original file line number Diff line number Diff line change 1
1
/*!
2
2
3
- JSZip v3.3 .0 - A JavaScript class for generating and reading zip files
3
+ JSZip v3.5 .0 - A JavaScript class for generating and reading zip files
4
4
<http://stuartk.com/jszip>
5
5
6
6
(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
@@ -1057,7 +1057,7 @@ JSZip.defaults = require('./defaults');
1057
1057
1058
1058
// TODO find a better way to handle this version,
1059
1059
// a require('package.json').version doesn't work with webpack, see #327
1060
- JSZip . version = "3.4 .0" ;
1060
+ JSZip . version = "3.5 .0" ;
1061
1061
1062
1062
JSZip . loadAsync = function ( content , options ) {
1063
1063
return new JSZip ( ) . loadAsync ( content , options ) ;
@@ -3976,7 +3976,7 @@ ZipEntry.prototype = {
3976
3976
this . extraFields = { } ;
3977
3977
}
3978
3978
3979
- while ( reader . index < end ) {
3979
+ while ( reader . index + 4 < end ) {
3980
3980
extraFieldId = reader . readInt ( 2 ) ;
3981
3981
extraFieldLength = reader . readInt ( 2 ) ;
3982
3982
extraFieldValue = reader . readData ( extraFieldLength ) ;
@@ -3987,6 +3987,8 @@ ZipEntry.prototype = {
3987
3987
value : extraFieldValue
3988
3988
} ;
3989
3989
}
3990
+
3991
+ reader . setIndex ( end ) ;
3990
3992
} ,
3991
3993
/**
3992
3994
* Apply an UTF8 transformation if needed.
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ JSZip.defaults = require('./defaults');
42
42
43
43
// TODO find a better way to handle this version,
44
44
// a require('package.json').version doesn't work with webpack, see #327
45
- JSZip . version = "3.4 .0" ;
45
+ JSZip . version = "3.5 .0" ;
46
46
47
47
JSZip . loadAsync = function ( content , options ) {
48
48
return new JSZip ( ) . loadAsync ( content , options ) ;
You can’t perform that action at this time.
0 commit comments