]> granicus.if.org Git - postgresql/commit
ltree: Zero padding bytes when allocating memory for externally visible data.
authorAndres Freund <andres@anarazel.de>
Tue, 8 Mar 2016 22:59:29 +0000 (14:59 -0800)
committerAndres Freund <andres@anarazel.de>
Tue, 8 Mar 2016 22:59:29 +0000 (14:59 -0800)
commit598a01de69b9e8b3cd106935e41db45d1b4853c4
treeac5d8ab7d2da275218479e7c82afa35d637fe41f
parent68dababfe3417399bddd4b10107458c6c13e8626
ltree: Zero padding bytes when allocating memory for externally visible data.

ltree/ltree_gist/ltxtquery's headers stores data at MAXALIGN alignment,
requiring some padding bytes. So far we left these uninitialized. Zero
those by using palloc0.

Author: Andres Freund
Reported-By: Andres Freund / valgrind / buildarm animal skink
Backpatch: 9.1-
contrib/ltree/_ltree_gist.c
contrib/ltree/_ltree_op.c
contrib/ltree/ltree_gist.c
contrib/ltree/ltree_op.c
contrib/ltree/ltxtquery_io.c