Fix overflow danger in SampleHeapTupleVisible()
Melanie Plageman <melanieplageman@gmail.com>
Fix overflow danger in SampleHeapTupleVisible() 68d9662be1c4b70 made HeapScanDesc->rs_ntuples unsigned but neglected to change how it was being used in SampleHeapTupleVisible(). Return early if rs_ntuples is 0 to avoid overflowing and incorrectly executing the loop code in SampleHeapTupleVisible(). Reported-by: Ranier Vilela Discussion: https://postgr.es/m/CAEudQAot_xQoZyPZjpj1aBUPrPykY5mOPHGyvfe%3Djz%2BWowdA3A%40mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/heap/heapam_handler.c | modified | +9 −3 |
Discussion
- Can rs_cindex be < 0 for bitmap heap scans? 21 messages · 2024-10-23 → 2024-12-20