summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/lib/Transforms/Utils/CloneModule.cpp
diff options
context:
space:
mode:
authorkn <kn@openbsd.org>2019-06-22 20:15:09 +0000
committerkn <kn@openbsd.org>2019-06-22 20:15:09 +0000
commit50b584e51139d72fef53ce11c0da9990dcd89799 (patch)
treeffbd71d29763c016e17fbd5e5fa32caf11a59cf2 /gnu/llvm/lib/Transforms/Utils/CloneModule.cpp
parentSwap (opcount >= opleft || opcount == -1) to (opcount == -1 || opcount >= opleft) like (diff)
downloadwireguard-openbsd-50b584e51139d72fef53ce11c0da9990dcd89799.tar.xz
wireguard-openbsd-50b584e51139d72fef53ce11c0da9990dcd89799.zip
Make computation of re-challenge timeout more obvious
Instead of masking the difference between lower and upper bound to yield a random summand that fits, instruct the API to limit their result accordingly. 0x01fe = 510 = 810 - 300. arc4random_uniform(upper_bound) returns `upper_bound - 1' as maximum, so add one to make 810 a possible value for `i'. OK deraadt
Diffstat (limited to 'gnu/llvm/lib/Transforms/Utils/CloneModule.cpp')
0 files changed, 0 insertions, 0 deletions