From c2a366d9d9d3b1e2dc4c65d9a9fab5c1c0d6c246 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 24 May 2011 14:20:08 -0400 Subject: [PATCH] Avoid uninitialized bits in the result of QTN2QT(). Found with additional valgrind testing. Noah Misch --- src/backend/utils/adt/tsquery_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/utils/adt/tsquery_util.c b/src/backend/utils/adt/tsquery_util.c index 522dd8d62fb..0313a85f8a3 100644 --- a/src/backend/utils/adt/tsquery_util.c +++ b/src/backend/utils/adt/tsquery_util.c @@ -336,7 +336,7 @@ QTN2QT(QTNode *in) cntsize(in, &sumlen, &nnode); len = COMPUTESIZE(nnode, sumlen); - out = (TSQuery) palloc(len); + out = (TSQuery) palloc0(len); SET_VARSIZE(out, len); out->size = nnode; -- 2.39.5