6990370: FindBugs scan - Malicious code vulnerability Warnings in com.sun.jndi.ldap.*
authorweijun
Tue, 07 Dec 2010 17:30:54 +0800
changeset 7536 73bcb3cc8568
parent 7535 53c289115e11
child 7538 e7916d8751e0
6990370: FindBugs scan - Malicious code vulnerability Warnings in com.sun.jndi.ldap.* Reviewed-by: xuelei
jdk/src/share/classes/com/sun/jndi/ldap/BasicControl.java
--- a/jdk/src/share/classes/com/sun/jndi/ldap/BasicControl.java	Tue Dec 07 01:09:17 2010 -0800
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/BasicControl.java	Tue Dec 07 17:30:54 2010 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -113,6 +113,6 @@
       *         ASN.1 BER encoded value.
       */
     public byte[] getEncodedValue() {
-        return value;
+        return value == null ? null : value.clone();
     }
 }