Sequence numbers are in the range [0, SKEY_MAX_SEQ] inclusive.
This means the maximum value for the -n option (count) should be
SKEY_MAX_SEQ + 1. From Denis Bodor.
-/* $OpenBSD: skey.c,v 1.35 2019/01/25 00:19:26 millert Exp $ */
+/* $OpenBSD: skey.c,v 1.36 2024/08/03 22:00:31 millert Exp $ */
/*
* OpenBSD S/Key (skey.c)
*
case 'n':
if (++i == argc)
usage();
- cnt = strtonum(argv[i], 1, SKEY_MAX_SEQ -1, &errstr);
+ cnt = strtonum(argv[i], 1, SKEY_MAX_SEQ + 1,
+ &errstr);
if (errstr)
usage();
break;