]> git.ipfire.org Git - thirdparty/knot-resolver.git/commit
gc: fix integer overflow when computing how much to GC
authorVladimír Čunát <vladimir.cunat@nic.cz>
Tue, 9 Jun 2020 06:09:32 +0000 (08:09 +0200)
committerTomas Krizek <tomas.krizek@nic.cz>
Mon, 29 Jun 2020 12:25:32 +0000 (14:25 +0200)
commit26cf29390b2acfe8c6b0547532474ae53763cf42
tree58617ebbeae3fad8139294414555fcafd9495edc
parente50395a472bfc8bd37df32215e9fcc8ec12e24cd
gc: fix integer overflow when computing how much to GC

On 32-bit systems the insufficient GC could commonly happen:
https://lists.nic.cz/pipermail/knot-resolver-users/2020/000265.html

The meaning of -f parameter got slightly changed, so that the buggy
computation could be greatly simplified.  GC seems to make sense when
most of cache space is used, in which case the difference is small.
NEWS
utils/cache_gc/kr_cache_gc.c
utils/cache_gc/kr_cache_gc.h
utils/cache_gc/main.c