Skip to content

Commit 95e99f1

Browse files
committed
fix tests.c in the count == 0 case
1 parent 452d8e4 commit 95e99f1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/tests.c

+5
Original file line numberDiff line numberDiff line change
@@ -2725,6 +2725,11 @@ void test_ecmult_multi(secp256k1_scratch *scratch, secp256k1_ecmult_multi_func e
27252725
}
27262726

27272727
/* Sanity check that zero scalars don't cause problems */
2728+
for (ncount = 0; ncount < 20; ncount++) {
2729+
random_scalar_order(&sc[ncount]);
2730+
random_group_element_test(&pt[ncount]);
2731+
}
2732+
27282733
secp256k1_scalar_clear(&sc[0]);
27292734
CHECK(ecmult_multi(&ctx->ecmult_ctx, scratch, &r, &szero, ecmult_multi_callback, &data, 20));
27302735
secp256k1_scalar_clear(&sc[1]);

0 commit comments

Comments
 (0)