From 66daeb074b3fbdb071a5631c066f5e41d554220e Mon Sep 17 00:00:00 2001 From: Teodor Sigaev Date: Mon, 26 Mar 2007 13:57:07 +0000 Subject: [PATCH] Add checking of end of line in parsing stopword list. Thanks to sharp eyes of Tom lane --- contrib/tsearch2/stopword.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'; -- GitLab