diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-10-22 09:37:38 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-22 16:45:09 +0100 |
commit | 9740a474a43260ababe5db3c49109b0190ba8a7f (patch) | |
tree | b3fe865b4a4d49e5a9b50727ae69fcb7b9b0e486 /scripting | |
parent | 2092a029bb4eeacc1029a11b77b6120d0ad3a9ff (diff) |
coverity#1326429 Dereference null return value
Change-Id: Ib047f6cb255610422afb423006b58e0da7eacead
Diffstat (limited to 'scripting')
-rw-r--r-- | scripting/java/com/sun/star/script/framework/io/UCBStreamHandler.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/scripting/java/com/sun/star/script/framework/io/UCBStreamHandler.java b/scripting/java/com/sun/star/script/framework/io/UCBStreamHandler.java index 432d401ac322..4e2059b2f5c5 100644 --- a/scripting/java/com/sun/star/script/framework/io/UCBStreamHandler.java +++ b/scripting/java/com/sun/star/script/framework/io/UCBStreamHandler.java @@ -207,13 +207,12 @@ public class UCBStreamHandler extends URLStreamHandler { InputStream is) throws IOException { - ZipEntry entry; ZipInputStream zis = new ZipInputStream(is); while (zis.available() != 0) { - entry = zis.getNextEntry(); + ZipEntry entry = zis.getNextEntry(); - if (entry.getName().equals(file)) { + if (entry != null && entry.getName().equals(file)) { return zis; } } @@ -275,4 +274,4 @@ public class UCBStreamHandler extends URLStreamHandler { return result; } -}
\ No newline at end of file +} |