forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite027ee9
committed
Fix potential integer overflow in bringetbitmap()
This function expects an "int64" as result and stores the number ofpages to add to the index scan bitmap as an "int", multiplying its finalresult by 10. For a relation large enough, this can theoreticallyoverflow if counting more than (INT32_MAX / 10) pages, knowing that thenumber of pages is upper-bounded by MaxBlockNumber.To avoid the overflow, this commit redefines "totalpages", used tocalculate the result, to be an "int64" rather than an "int".Reported-by: Evgeniy GorbanyovAuthor: James HunterDiscussion:https://www.postgresql.org/message-id/07704817-6fa0-460c-b1cf-cd18f7647041@basealt.ruBackpatch-through: 131 parentdc24c9a commite027ee9
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
563 | 563 |
| |
564 | 564 |
| |
565 | 565 |
| |
566 |
| - | |
| 566 | + | |
567 | 567 |
| |
568 | 568 |
| |
569 | 569 |
| |
|
0 commit comments
Comments
(0)