Skip to content

Commit 786dfb4

Browse files
committed
Merge bitcoin#583: JNI: fix use sig array
74e2dbd JNI: fix use sig array (liuyujun) Pull request description: ACKs for commit 74e2db: sipa: ACK 74e2dbd. This is clearly an improvement. real-or-random: ACK 74e2dbd I've read the code but haven't tested it Tree-SHA512: 850b32e893463be4be28185dcc127d429afe4b6076036a078b7c61d590e0f4ea89127e448760b71c087cf70ffbefc52d87db77a5131bee81f3e4f95cfbd3bd3e
2 parents e95f8ab + 74e2dbd commit 786dfb4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/java/org_bitcoin_NativeSecp256k1.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,15 @@ SECP256K1_API jobjectArray JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1e
8181
jbyteArray sigArray, intsByteArray;
8282
unsigned char intsarray[2];
8383

84-
secp256k1_ecdsa_signature sig[72];
84+
secp256k1_ecdsa_signature sig;
8585

86-
int ret = secp256k1_ecdsa_sign(ctx, sig, data, secKey, NULL, NULL);
86+
int ret = secp256k1_ecdsa_sign(ctx, &sig, data, secKey, NULL, NULL);
8787

8888
unsigned char outputSer[72];
8989
size_t outputLen = 72;
9090

9191
if( ret ) {
92-
int ret2 = secp256k1_ecdsa_signature_serialize_der(ctx,outputSer, &outputLen, sig ); (void)ret2;
92+
int ret2 = secp256k1_ecdsa_signature_serialize_der(ctx,outputSer, &outputLen, &sig ); (void)ret2;
9393
}
9494

9595
intsarray[0] = outputLen;

0 commit comments

Comments
 (0)