Avoid a possible overflow (src/backend/utils/sort/logtape.c)
Ranier Vilela <ranier.vf@gmail.com>
From: Ranier Vilela <ranier.vf@gmail.com>
To: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2023-08-24T17:46:42Z
Lists: pgsql-hackers
Attachments
- 0001-Avoid-possible-overflow-with-ltsGetFreeBlock-functio.patch (application/octet-stream) patch 0001
Hi, nFreeBlocks stores the number of free blocks and your type is *long*. At Function ltsGetFreeBlock is locally stored in heapsize wich type is *int* With Windows both *long* and *int* are 4 bytes. But with Linux *long* is 8 bytes and *int* are 4 bytes. patch attached. best regards, Ranier Vilela
Commits
-
Avoid possible overflow with ltsGetFreeBlock() in logtape.c
- 420c8dc7ec67 13.13 landed
- d2bd4ba30585 14.10 landed
- 5180160c1774 15.5 landed
- 1d2939b6dc63 16.0 landed
- 52c6c0f19693 17.0 landed