Content-Length: 257005 | pFad | http://github.com/postgrespro/postgres_cluster/commit/cb0c8cbf316f9362c11d7a8356e6f459258ae78e

19 Fix possible use of uninitialised value in ts_headline() · postgrespro/postgres_cluster@cb0c8cb · GitHub
Skip to content

Commit cb0c8cb

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 690c543 commit cb0c8cb

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
@@ -2465,6 +2465,8 @@ mark_hl_words(HeadlineParsedText *prs, TSQuery query, int highlight,
24652465
}
24662466
else
24672467
{ /* shorter cover :((( */
2468+
if (i > q)
2469+
i = q;
24682470
for (; curlen > min_words; i--)
24692471
{
24702472
if (!NONWORDTOKEN(prs->words[i].type))

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/cb0c8cbf316f9362c11d7a8356e6f459258ae78e

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy