mirror of
https://github.com/postgres/postgres.git
synced 2025-04-27 22:56:53 +03:00
Fix out-of-bound read in gtsvector_picksplit()
This could lead to an imprecise choice when splitting an index page of a GiST index on a tsvector, deciding which entries should remain on the old page and which entries should move to a new page. This is wrong since tsearch2 has been moved into core with commit 140d4ebcb46e, so backpatch all the way down. This error has been spotted by valgrind. Author: Alexander Lakhin Discussion: https://postgr.es/m/17950-6c80a8d2b94ec695@postgresql.org Backpatch-through: 11
This commit is contained in:
parent
019c13e7a9
commit
82fa8ae5f9
@ -728,7 +728,7 @@ gtsvector_picksplit(PG_FUNCTION_ARGS)
|
||||
size_alpha = SIGLENBIT(siglen) -
|
||||
sizebitvec((cache[j].allistrue) ?
|
||||
GETSIGN(datum_l) :
|
||||
GETSIGN(cache[j].sign),
|
||||
cache[j].sign,
|
||||
siglen);
|
||||
}
|
||||
else
|
||||
@ -742,7 +742,7 @@ gtsvector_picksplit(PG_FUNCTION_ARGS)
|
||||
size_beta = SIGLENBIT(siglen) -
|
||||
sizebitvec((cache[j].allistrue) ?
|
||||
GETSIGN(datum_r) :
|
||||
GETSIGN(cache[j].sign),
|
||||
cache[j].sign,
|
||||
siglen);
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user