From: teor Date: Wed, 29 Apr 2020 05:57:44 +0000 (+1000) Subject: rand: Clarify the crypto_rand_uint() range X-Git-Tag: tor-0.4.5.0-alpha-dev~48 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6eec43161ad9e072d82da88163e748566b39d127;p=thirdparty%2Ftor.git rand: Clarify the crypto_rand_uint() range --- diff --git a/src/lib/crypt_ops/crypto_rand_numeric.c b/src/lib/crypt_ops/crypto_rand_numeric.c index ffbfa2d56c..b2516c4bdc 100644 --- a/src/lib/crypt_ops/crypto_rand_numeric.c +++ b/src/lib/crypt_ops/crypto_rand_numeric.c @@ -33,8 +33,8 @@ /** * Return a pseudorandom integer chosen uniformly from the values between 0 - * and limit-1 inclusive. limit must be strictly between 0 and - * UINT_MAX. */ + * and limit-1 inclusive. limit must be strictly greater than 0, and + * less than UINT_MAX. */ unsigned crypto_rand_uint(unsigned limit) {