X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=apps%2Frand.c;h=bd6fdff123ff447705ae2b9774e26ee1e8ed3edc;hp=150eef4fb15cf4f0ad2134975bec5cc4fb567c8c;hb=bd4850df648bee9d8e0595b7e1147266e6f55a3e;hpb=2bec39eb86986349d2538fffc821f2e1106cee14 diff --git a/apps/rand.c b/apps/rand.c index 150eef4fb1..bd6fdff123 100644 --- a/apps/rand.c +++ b/apps/rand.c @@ -121,9 +121,7 @@ int rand_main(int argc, char **argv) argc = opt_num_rest(); argv = opt_rest(); - if (argc != 1) - goto opthelp; - if (sscanf(argv[0], "%d", &num) != 1 || num < 0) + if (argc != 1 || !opt_int(argv[0], &num) || num < 0) goto opthelp; app_RAND_load_file(NULL, (inrand != NULL));