Re: Possible integer overflow when calculating hysteresis in desktop/netsurf.c

2021-01-25 Thread Michael Drake
On 24/01/2021 18:09, Jonas wrote: > Dear NetSurf developers, > > I would like to point out a possible integer overflow bug on systems > where size_t is 32-bit. In netsurf/desktop/netsurf.c:170 -- multiplying > ‘disc_cache_size’ (being 1 GB) with 20 gives 0, thus resulting in > ‘hysteresis’ also be

Re: Possible integer overflow when calculating hysteresis in desktop/netsurf.c

2021-01-24 Thread Rob Kendrick
On Sun, Jan 24, 2021 at 11:03:43AM -0800, o...@eigenstate.org wrote: > Quoth Thorsten Otto : > > On Sonntag, 24. Januar 2021 19:09:35 CET Jonas wrote: > > > What do you think? > > > > I think that a compiler that defines size_t to be 32bit on a 64bit system > > is > > broken ;) > > It's perfect

Re: Possible integer overflow when calculating hysteresis in desktop/netsurf.c

2021-01-24 Thread ori
Quoth Thorsten Otto : > On Sonntag, 24. Januar 2021 19:09:35 CET Jonas wrote: > > What do you think? > > I think that a compiler that defines size_t to be 32bit on a 64bit system is > broken ;) > > It's perfectly legal -- size_t is required to hold the maximum allowed object size. It's not req

Re: Possible integer overflow when calculating hysteresis in desktop/netsurf.c

2021-01-24 Thread Thorsten Otto
On Sonntag, 24. Januar 2021 19:09:35 CET Jonas wrote: > What do you think? I think that a compiler that defines size_t to be 32bit on a 64bit system is broken ;) ___ netsurf-dev mailing list -- netsurf-dev@netsurf-browser.org To unsubscribe send an ema

Possible integer overflow when calculating hysteresis in desktop/netsurf.c

2021-01-24 Thread Jonas
Dear Netsurf developers, I would like to point out a possible integer overflow bug on systems where size_t is 32-bit. In netsurf/desktop/netsurf.c:170 -- multiplying ‘disc_cache_size’ (being 1 GB) with 20 gives 0, thus resulting in ‘hysteresis’ also becoming 0. We discovered this on Plan 9 (whe