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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy