]> git.ipfire.org Git - thirdparty/systemd.git/commit
percent-util: clamp percent range before converting to 2^32 scale
authorLennart Poettering <lennart@poettering.net>
Fri, 29 Oct 2021 12:33:37 +0000 (14:33 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 3 Nov 2021 03:41:17 +0000 (12:41 +0900)
commit2f2cdd7250d83af27820d0223ed588ad7b02eb71
treee3177fdcde772b07fd96f7c9e74beb760f84dd17
parent4768cc450d6dac9737c6f1e7573a3a47b4b6b937
percent-util: clamp percent range before converting to 2^32 scale

Let#s better be safe than sorry and clamp the input, so that we don't
hit overflow issues.
src/basic/percent-util.h