OSDN Git Service
(root)
/
pg-rex
/
syncrep.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
59a4a57
)
Avoid uninitialized bits in the result of QTN2QT().
author
Tom Lane
<tgl@sss.pgh.pa.us>
Tue, 24 May 2011 18:20:08 +0000
(14:20 -0400)
committer
Tom Lane
<tgl@sss.pgh.pa.us>
Tue, 24 May 2011 18:20:08 +0000
(14:20 -0400)
Found with additional valgrind testing.
Noah Misch
src/backend/utils/adt/tsquery_util.c
patch
|
blob
|
history
diff --git
a/src/backend/utils/adt/tsquery_util.c
b/src/backend/utils/adt/tsquery_util.c
index
ca254f9
..
53093f1
100644
(file)
--- 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) palloc
0
(len);
SET_VARSIZE(out, len);
out->size = nnode;