added clone for passed in sig array.
import java.util.ArrayList;
import java.util.List;
+import org.bouncycastle.util.Arrays;
+
/**
* XMSS^MT Signature.
*/
@@ -123,7 +125,7 @@ public Builder withReducedSignatures(List<XMSSReducedSignature> val)
public Builder withSignature(byte[] val)
{
- signature = val;
+ signature = Arrays.clone(val);
return this;
}
