Repository: incubator-guacamole-client
Updated Branches:
  refs/heads/staging/0.9.14-incubating 1a7f85ae5 -> 393c70f23


GUACAMOLE-362: Fix resource leak in FileInputStream when reading private key.


Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/5c0c8239
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/5c0c8239
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/5c0c8239

Branch: refs/heads/staging/0.9.14-incubating
Commit: 5c0c823913a1d77e4f72bf3212f0f7a1032cf1e1
Parents: 1a7f85a
Author: Nick Couchman <vn...@apache.org>
Authored: Sat Oct 28 09:15:58 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Sat Oct 28 09:15:58 2017 -0400

----------------------------------------------------------------------
 .../apache/guacamole/auth/cas/conf/PrivateKeyGuacamoleProperty.java | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/5c0c8239/extensions/guacamole-auth-cas/src/main/java/org/apache/guacamole/auth/cas/conf/PrivateKeyGuacamoleProperty.java
----------------------------------------------------------------------
diff --git 
a/extensions/guacamole-auth-cas/src/main/java/org/apache/guacamole/auth/cas/conf/PrivateKeyGuacamoleProperty.java
 
b/extensions/guacamole-auth-cas/src/main/java/org/apache/guacamole/auth/cas/conf/PrivateKeyGuacamoleProperty.java
index bd0bd69..78da89e 100644
--- 
a/extensions/guacamole-auth-cas/src/main/java/org/apache/guacamole/auth/cas/conf/PrivateKeyGuacamoleProperty.java
+++ 
b/extensions/guacamole-auth-cas/src/main/java/org/apache/guacamole/auth/cas/conf/PrivateKeyGuacamoleProperty.java
@@ -60,6 +60,7 @@ public abstract class PrivateKeyGuacamoleProperty implements 
GuacamoleProperty<P
             for (int readBytes; (readBytes = keyStreamIn.read(keyBuffer)) != 
-1;)
                 keyStreamOut.write(keyBuffer, 0, readBytes);
 
+            keyStreamIn.close();
             final byte[] keyBytes = keyStreamOut.toByteArray();
 
             // Set up decryption infrastructure

Reply via email to