From: Tom Lane Date: Tue, 24 May 2011 18:20:08 +0000 (-0400) Subject: Avoid uninitialized bits in the result of QTN2QT(). X-Git-Tag: REL8_3_16~57 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9a57eafe9d29280fa65c5912df38fc8650507035;p=postgresql Avoid uninitialized bits in the result of QTN2QT(). Found with additional valgrind testing. Noah Misch --- diff --git a/src/backend/utils/adt/tsquery_util.c b/src/backend/utils/adt/tsquery_util.c index fd5430ce16..01afc4e0bb 100644 --- a/src/backend/utils/adt/tsquery_util.c +++ b/src/backend/utils/adt/tsquery_util.c @@ -339,7 +339,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;