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:
Tobias Brunner 2020-03-02 17:37:54 +01:00
parent 7a13246668
commit e1cc667920
1 changed files with 4 additions and 0 deletions

View File

@ -56,6 +56,10 @@ int main(int argc, char *argv[])
}
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"))
{