Skip to content

Commit bf73016

Browse files
committed
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
1 parent 8491679 commit bf73016

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/backend/tsearch/wparser_def.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2441,6 +2441,8 @@ mark_hl_words(HeadlineParsedText *prs, TSQuery query, int highlight,
24412441
}
24422442
else
24432443
{ /* shorter cover :((( */
2444+
if (i > q)
2445+
i = q;
24442446
for (; curlen > min_words; i--)
24452447
{
24462448
if (!NONWORDTOKEN(prs->words[i].type))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy