diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-03-28 01:28:34 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-03-28 01:28:34 +0000 |
commit | 0565579c5b780fee3cb81fc128c48e7ad727d308 (patch) | |
tree | 8b8968a4f3e2fc8316519cc0c7fa2d52e51bf02f | |
parent | bf94076348ef7e0a81e3fe4ededb2fdcd14b303b (diff) | |
download | postgresql-0565579c5b780fee3cb81fc128c48e7ad727d308.tar.gz postgresql-0565579c5b780fee3cb81fc128c48e7ad727d308.zip |
Fix uninitialized-variable bug.
-rw-r--r-- | contrib/tsearch2/dict_syn.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/tsearch2/dict_syn.c b/contrib/tsearch2/dict_syn.c index cf730ed88d5..c76208eccb5 100644 --- a/contrib/tsearch2/dict_syn.c +++ b/contrib/tsearch2/dict_syn.c @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/contrib/tsearch2/dict_syn.c,v 1.13 2007/03/26 12:25:35 teodor Exp $ */ +/* $PostgreSQL: pgsql/contrib/tsearch2/dict_syn.c,v 1.14 2007/03/28 01:28:34 tgl Exp $ */ /* * ISpell interface @@ -103,7 +103,8 @@ syn_init(PG_FUNCTION_ARGS) while (fgets(buf, sizeof(buf), fin)) { - pg_verifymbstr(buf, strlen(buf), false); + slen = strlen(buf); + pg_verifymbstr(buf, slen, false); if (cur == d->len) { d->len = (d->len) ? 2 * d->len : 16; |