mirror of
https://github.com/postgres/postgres.git
synced 2025-05-02 11:44:50 +03:00
Fix possible use of uninitialised value in ts_headline()
Found during investigation of failure of skink buildfarm member and its valgrind report. Backpatch to all supported branches
This commit is contained in:
parent
8491679434
commit
bf73016e01
@ -2441,6 +2441,8 @@ mark_hl_words(HeadlineParsedText *prs, TSQuery query, int highlight,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ /* shorter cover :((( */
|
{ /* shorter cover :((( */
|
||||||
|
if (i > q)
|
||||||
|
i = q;
|
||||||
for (; curlen > min_words; i--)
|
for (; curlen > min_words; i--)
|
||||||
{
|
{
|
||||||
if (!NONWORDTOKEN(prs->words[i].type))
|
if (!NONWORDTOKEN(prs->words[i].type))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user