aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTeodor Sigaev <teodor@sigaev.ru>2007-03-26 13:57:07 +0000
committerTeodor Sigaev <teodor@sigaev.ru>2007-03-26 13:57:07 +0000
commit66daeb074b3fbdb071a5631c066f5e41d554220e (patch)
tree3c33a3761d2e931b6a95d9079d665ce26fbceb50
parentdebb3aa8e9d4a4ae78894566af85679edd9232ba (diff)
downloadpostgresql-66daeb074b3fbdb071a5631c066f5e41d554220e.tar.gz
postgresql-66daeb074b3fbdb071a5631c066f5e41d554220e.zip
Add checking of end of line in parsing stopword list. Thanks to sharp eyes of Tom lane
-rw-r--r--contrib/tsearch2/stopword.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/tsearch2/stopword.c b/contrib/tsearch2/stopword.c
index 582932e84be..2165bb68ddc 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';