Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cc24fb4

Browse files
committed
Avoid uninitialized bits in the result of QTN2QT().
Found with additional valgrind testing. Noah Misch
1 parent 59a4a57 commit cc24fb4

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
@@ -336,7 +336,7 @@ QTN2QT(QTNode *in)
336336
cntsize(in, &sumlen, &nnode);
337337
len = COMPUTESIZE(nnode, sumlen);
338338

339-
out = (TSQuery) palloc(len);
339+
out = (TSQuery) palloc0(len);
340340
SET_VARSIZE(out, len);
341341
out->size = nnode;
342342

0 commit comments

Comments
 (0)