pubkey-speed: Add sanity check for the number of rounds
The allocated buffer for the signatures is based on this, which LGTM doesn't like.
This commit is contained in:
parent
7a13246668
commit
e1cc667920
|
@ -56,6 +56,10 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
rounds = atoi(argv[3]);
|
rounds = atoi(argv[3]);
|
||||||
|
if (rounds < 0 || rounds > (2^26))
|
||||||
|
{ /* arbitrary limit to the number of chunk_t/sigs that fit into 1 GiB */
|
||||||
|
usage();
|
||||||
|
}
|
||||||
|
|
||||||
if (streq(argv[2], "rsa"))
|
if (streq(argv[2], "rsa"))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue