Content-Length: 259535 | pFad | http://github.com/postgrespro/postgres/commit/0852006a946aa9795b4913bccebb88d623942ca6

DD Fix bogus MaxAllocSize check in logtape.c. · postgrespro/postgres@0852006 · GitHub
Skip to content

Commit 0852006

Browse files
committed
Fix bogus MaxAllocSize check in logtape.c.
Reported-by: Peter Geoghegan Discussion: https://postgr.es/m/CAH2-Wz=NZPZc3-fkdmvu=w2itx0PiB-G6QpxHXZOjuvFAzPdZw@mail.gmail.com Backpatch-through: 13
1 parent f43e295 commit 0852006

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/utils/sort/logtape.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ ltsReleaseBlock(LogicalTapeSet *lts, long blocknum)
491491
* If the freelist becomes very large, just return and leak this free
492492
* block.
493493
*/
494-
if (lts->freeBlocksLen * 2 > MaxAllocSize)
494+
if (lts->freeBlocksLen * 2 * sizeof(long) > MaxAllocSize)
495495
return;
496496

497497
lts->freeBlocksLen *= 2;

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/0852006a946aa9795b4913bccebb88d623942ca6

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy