diff --git a/scripts/pubkey_speed.c b/scripts/pubkey_speed.c index 83ab4e41b..21e4d2c1e 100644 --- a/scripts/pubkey_speed.c +++ b/scripts/pubkey_speed.c @@ -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")) {