Skip to content

Commit 9a57eaf

Browse files
committed
Avoid uninitialized bits in the result of QTN2QT().
Found with additional valgrind testing. Noah Misch
1 parent 18afe42 commit 9a57eaf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/utils/adt/tsquery_util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ QTN2QT(QTNode *in)
339339
cntsize(in, &sumlen, &nnode);
340340
len = COMPUTESIZE(nnode, sumlen);
341341

342-
out = (TSQuery) palloc(len);
342+
out = (TSQuery) palloc0(len);
343343
SET_VARSIZE(out, len);
344344
out->size = nnode;
345345

0 commit comments

Comments
 (0)