diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2021-01-25 13:39:28 +0000 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2021-01-25 13:39:28 +0000 |
commit | da2aa05b730560024760a25dabc2078f578efd10 (patch) | |
tree | 369219c9dcc77a31783eb7bee66f5b1988c5b138 /desktop/textinput.h | |
parent | 98496cdae16a9196bff930fff52e198a9856e2cb (diff) | |
download | netsurf-da2aa05b730560024760a25dabc2078f578efd10.tar.gz netsurf-da2aa05b730560024760a25dabc2078f578efd10.tar.bz2 |
Prevent overflow of disc cache hysteresis.
The default disc cache size is 1GB (1024 * 1024 * 1024).
On systems with 32bit size_t, the hysteresis calculation,
which multiplied 1GB by 20 would overflow, causing a zero
hysteresis.
(1024 * 1024 * 1024) * 20 % (2^32)
= 0
Thanks to Jonas Amoson for reporting.
Diffstat (limited to 'desktop/textinput.h')
0 files changed, 0 insertions, 0 deletions