]> 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)
commit12449f1409d710c62dd7678a97b218bc5bcb893a
treebdd698a2b025103558404af05d9abe658930822b
parent44f9f1f2d51103dc528ab8bd3b7849e26fe1cdc7
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