Possible integer overflow in bringetbitmap()
Evgeniy Gorbanev <gorbanyoves@basealt.ru>
From: Evgeniy Gorbanyov <gorbanyoves@basealt.ru>
To: pgsql-hackers@lists.postgresql.org
Date: 2024-11-26T10:56:50Z
Lists: pgsql-hackers
Attachments
- Possible-integer-overflow-in-bringetbitmap.patch (text/x-patch) patch
Hello. Function bringetbitmap() in src/backend/access/brin/brin.c:560 returns type int64. But the returned variable 'totalpages' is of type int. Maybe it makes sense to change the type of variable 'totalpages' to int64 to avoid possible overflow in expression 'totalpages * 10'? Patch is included in the attachment. Best regards, Evgeniy Gorbanyov
Commits
-
Fix potential integer overflow in bringetbitmap()
- 332023e2d032 13.19 landed
- e35ff6520569 14.16 landed
- 9e9f30139eb8 15.11 landed
- bfda7d8dd6b3 16.7 landed
- e027ee9902fa 17.3 landed
- 720e529840d5 18.0 landed