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-03 11:34:22 +01:00
parent 7a13246668
commit e1cc667920
+4
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"))
{