From: Teodor Sigaev <teodor@sigaev.ru>
Date: Mon, 26 Mar 2007 13:57:07 +0000 (+0000)
Subject: Add checking of end of line in parsing stopword list. Thanks to sharp eyes of Tom... 
X-Git-Tag: REL8_3_BETA1~958
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=66daeb074b3fbdb071a5631c066f5e41d554220e;p=postgresql

Add checking of end of line in parsing stopword list. Thanks to sharp eyes of Tom lane
---

diff --git a/contrib/tsearch2/stopword.c b/contrib/tsearch2/stopword.c
index 582932e84b..2165bb68dd 100644
--- a/contrib/tsearch2/stopword.c
+++ b/contrib/tsearch2/stopword.c
@@ -48,7 +48,7 @@ readstoplist(text *in, StopList * s)
 		while (fgets(buf, sizeof(buf), hin))
 		{
 			pbuf = buf;
-			while( !isspace( *pbuf ) )
+			while( *pbuf && !isspace( *pbuf ) )
 				pbuf++;
 			*pbuf = '\0';