You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current version (2.6.4) allows to construct a ZipFile with a nullFile reference: (i.e. new ZipFile((File) null)) without proper validation. This does not happen if you use the constructor with the String argument as internally it does a new File(string) and if the string is null the File constructor throws a NPE.
The consequence of this is that when you want to do an operation with the ZipFile instance (e.g. zipFile.getFileHeaders() it throws a NPE on this line.
To avoid these scenarios, it should be properly validated on construction of ZipFile if accepting a null reference as File is not valid later.
On previous versions (1.3.2) there was a check that somehow on later releases it was removed (particularly on this commit).
This is 1.3.2:
The text was updated successfully, but these errors were encountered:
Current version (2.6.4) allows to construct a
ZipFile
with anull
File
reference: (i.e.new ZipFile((File) null)
) without proper validation. This does not happen if you use the constructor with theString
argument as internally it does anew File(string)
and if the string isnull
theFile
constructor throws a NPE.The consequence of this is that when you want to do an operation with the
ZipFile
instance (e.g.zipFile.getFileHeaders()
it throws a NPE on this line.To avoid these scenarios, it should be properly validated on construction of
ZipFile
if accepting a null reference as File is not valid later.On previous versions (1.3.2) there was a check that somehow on later releases it was removed (particularly on this commit).
This is 1.3.2:
The text was updated successfully, but these errors were encountered: