diff --git a/bin/oathkey/oathkey.1 b/bin/oathkey/oathkey.1 index 981b3f3..5b43280 100644 --- a/bin/oathkey/oathkey.1 +++ b/bin/oathkey/oathkey.1 @@ -28,7 +28,7 @@ .\" .\" $Id$ .\" -.Dd October 23, 2015 +.Dd January 9, 2016 .Dt OATHKEY 1 .Os .Sh NAME @@ -78,7 +78,8 @@ The commands are: Compute and display the current code for the given key. If a count is specified, compute and display .Ar count -codes in total, starting with the current code. +codes in total, starting with the current code, up to a maximum of +1,000 codes. If writeback mode is enabled, the user's keyfile is updated to prevent reuse. .It Cm genkey Ar hotp | totp diff --git a/bin/oathkey/oathkey.c b/bin/oathkey/oathkey.c index bbaa0da..40807b3 100644 --- a/bin/oathkey/oathkey.c +++ b/bin/oathkey/oathkey.c @@ -297,7 +297,7 @@ oathkey_calc(int argc, char *argv[]) return (RET_USAGE); if (argc > 0) { n = strtoul(argv[0], &end, 10); - if (end == argv[0] || *end != '\0' || n < 1) + if (end == argv[0] || *end != '\0' || n < 1 || n > 1000) return (RET_USAGE); } else { n = 1;