surjectionproof: introduce SECP256K1_SURJECTIONPROOF_MAX_USED_INPUTS constant and set it to 16

This commit is contained in:
Andrew Poelstra
2019-04-30 23:04:08 +00:00
committed by Tim Ruffing
parent b8a3ff5f3b
commit 56f69d979f
4 changed files with 19 additions and 12 deletions

View File

@@ -77,7 +77,7 @@ SECP256K1_INLINE static int secp256k1_surjection_compute_public_keys(secp256k1_g
*ring_input_index = j;
}
j++;
if (j > n_pubkeys) {
if (j > n_pubkeys || j > SECP256K1_SURJECTIONPROOF_MAX_USED_INPUTS) {
return 0;
}
}