summaryrefslogtreecommitdiff
path: root/contrib/tsearch2/query.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/tsearch2/query.c')
-rw-r--r--contrib/tsearch2/query.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/tsearch2/query.c b/contrib/tsearch2/query.c
index b832deb22e8..902ee22fe54 100644
--- a/contrib/tsearch2/query.c
+++ b/contrib/tsearch2/query.c
@@ -928,7 +928,7 @@ tsquerytree(PG_FUNCTION_ARGS)
res = (text *) palloc(nrm.cur - nrm.buf + VARHDRSZ);
VARATT_SIZEP(res) = nrm.cur - nrm.buf + VARHDRSZ;
- strncpy(VARDATA(res), nrm.buf, nrm.cur - nrm.buf);
+ memcpy(VARDATA(res), nrm.buf, nrm.cur - nrm.buf);
pfree(q);
}