pgsql: ltree: Zero padding bytes when allocating memory for externally

Started by Andres Freundover 10 years ago1 messagescomitters
Jump to latest
#1Andres Freund
andres@anarazel.de

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-

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/8457c69feaf572a2d3025e47b6bed92bb8cb719b

Modified Files
--------------
contrib/ltree/_ltree_gist.c | 14 +++++++-------
contrib/ltree/_ltree_op.c | 8 ++++----
contrib/ltree/ltree_gist.c | 10 +++++-----
contrib/ltree/ltree_op.c | 6 +++---
contrib/ltree/ltxtquery_io.c | 2 +-
5 files changed, 20 insertions(+), 20 deletions(-)

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers