mirror of
https://github.com/postgres/postgres.git
synced 2026-02-22 01:11:05 -05: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
ca5d6edbfe
commit
9d3fb209a0
1 changed files with 2 additions and 0 deletions
|
|
@ -2439,6 +2439,8 @@ mark_hl_words(HeadlineParsedText *prs, TSQuery query, int highlight,
|
|||
}
|
||||
else
|
||||
{ /* shorter cover :((( */
|
||||
if (i > q)
|
||||
i = q;
|
||||
for (; curlen > min_words; i--)
|
||||
{
|
||||
if (!NONWORDTOKEN(prs->words[i].type))
|
||||
|
|
|
|||
Loading…
Reference in a new issue