On Jun 29, 2006, at 3:24 PM, Matthew Wringe wrote:

Hi,

I have attached a very small patch that fixes PR28204 : PBEKeySpec
incorrectly deletes the originally passed password array
(http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28204)

Instead of taking a reference to the passed password, it now creates a
copy of it.


This looks fine, except for this space here at the end:

+ System.arraycopy(password, 0, this.password, 0, password.length );

And you can accomplish the same thing with `clone()'.

The JavaDoc should also be updated to explain that a copy of the argument is made (the JDK documentation says this, and it is an important API detail).

I'll be out of town for the next few days, so if someone else can commit this, I'd appreciate it.

Thanks.

Attachment: PGP.sig
Description: This is a digitally signed message part

Reply via email to