Re: BRIN integer overflow

2024-02-21 Thread Daniel Gustafsson
> On 21 Feb 2024, at 06:40, Oleg Tselebrovskiy > wrote: > Function bringetbitmap that is used in BRIN's IndexAmRoutine should return an > int64 value, but the actual return value is int, since totalpages is int and > totalpages * 10 is also int. This could lead to integer overflow (totalpages *

BRIN integer overflow

2024-02-20 Thread Oleg Tselebrovskiy
Greetings, everyone! While analyzing output of Svace static analyzer [1] I've found a bug Function bringetbitmap that is used in BRIN's IndexAmRoutine should return an int64 value, but the actual return value is int, since totalpages is int and totalpages * 10 is also int. This could lead to