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
REL9_1_STABLE
Teodor Sigaev 10 years ago
parent d2189a8026
commit 94cda4f106
  1. 2
      src/backend/tsearch/wparser_def.c

@ -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…
Cancel
Save