ltree: Zero padding bytes when allocating memory for externally visible data.
authorAndres Freund
Tue, 8 Mar 2016 22:59:29 +0000 (14:59 -0800)
committerAndres Freund
Tue, 8 Mar 2016 22:59:29 +0000 (14:59 -0800)
commit8457c69feaf572a2d3025e47b6bed92bb8cb719b
tree186db5b291a03b0f7ac34c9431fabbcd84149fe0
parent6041d388c40a23ee0e7b313baeceb8998eed54bf
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