Skip to content

Commit 3924a1b

Browse files
committed
btrfs-progs: crypto: handle invalid number of iterations
The parameter for iterations accepts 0, which crashes later. Signed-off-by: David Sterba <[email protected]>
1 parent 1b63232 commit 3924a1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crypto/hash-speedtest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ int main(int argc, char **argv) {
279279

280280
if (argc - optind >= 1) {
281281
iterations = atoi(argv[optind]);
282-
if (iterations < 0)
282+
if (iterations < 1)
283283
iterations = 1;
284284
}
285285

0 commit comments

Comments
 (0)