6990370: FindBugs scan - Malicious code vulnerability Warnings in com.sun.jndi.ldap.*
Reviewed-by: xuelei
--- 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();
}
}