]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix integer-overflow problem in intarray's g_int_decompress().
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 7 Jan 2024 20:19:50 +0000 (15:19 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 7 Jan 2024 20:19:50 +0000 (15:19 -0500)
commit1c7443521f856dfb5f6731ff6fc0865a67a29f14
treeb1f6c2b412e149d2a8136817fc49f1d546d42fc9
parent72d5b27763a86c1d9af79e3169aef885b79373a3
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
contrib/intarray/_int_gist.c
contrib/intarray/data/test__int.data
contrib/intarray/expected/_int.out