Fix integer-overflow problem in intarray's g_int_decompress().
Tom Lane <tgl@sss.pgh.pa.us>
Fix integer-overflow problem in intarray's g_int_decompress(). An array element equal to INT_MAX gave this code indigestion, causing an infinite loop that surely ended in SIGSEGV. We fixed some nearby problems awhile ago (cf 757c5182f) but missed this. Report and diagnosis by Alexander Lakhin (bug #18273); patch by me Discussion: https://postgr.es/m/18273-9a832d1da122600c@postgresql.org
Files
| Path | Change | +/− |
|---|---|---|
| contrib/intarray/data/test__int.data | modified | +1 −0 |
| contrib/intarray/expected/_int.out | modified | +17 −16 |
| contrib/intarray/_int_gist.c | modified | +6 −4 |
| contrib/intarray/sql/_int.sql | modified | +3 −2 |
Discussion
- BUG #18273: Incorrect memory access occurs when gist__int index is building on data containing 2^31-1 2 messages · 2024-01-06 → 2024-01-07