JDK 9 Review Request for 8038349: Signing XML with DSA throws Exception when key is larger than 1024 bits

Xuelei Fan xuelei.fan at oracle.com
Thu May 1 23:27:49 UTC 2014

My fault.  I read the "l" (L) in the following line as "1" (one).
>> 225         byte asn1Bytes[] = new byte[6 + j + l];


On 5/2/2014 3:10 AM, Sean Mullan wrote:
>> 225         byte asn1Bytes[] = new byte[6 + j + l];
>> By the line, the length of the target byte array is known. I might
>> prefer to allocate the exactly size for byte array here.  Otherwise, the
>> 2nd System.arraycopy() would need re-allocate the array for more space.
> I'm not quite following you here. System.arrayCopy doesn't resize the
> array, it will throw an exception if the dest array is not big enough.
> Can you clarify what you mean or show me the corrected code?
> Thanks,

More information about the security-dev mailing list