summaryrefslogtreecommitdiff
path: root/girepository/gthash.c
diff options
context:
space:
mode:
authorMark Doffman <mark.doffman@codethink.co.uk>2014-03-27 20:50:21 +0000
committerMark Doffman <mark.doffman@codethink.co.uk>2014-03-27 20:50:21 +0000
commit68ff94340891f1ae4ea24546acdbbc39c4dcbcd0 (patch)
tree46f02cba671bcb321482c7961acd91aeee57ced5 /girepository/gthash.c
parent19da3f81593614198206c45527f973a22cdd621e (diff)
parent89e84d06dffbc732bac26a105244b7270c42e3ec (diff)
downloadgobject-introspection-68ff94340891f1ae4ea24546acdbbc39c4dcbcd0.tar.gz
Merge tag 'GOBJECT_INTROSPECTION_1_39_90' into baserock/markdoffman/1_39_90-mergebaserock/markdoffman/1_39_90-merge
Tag 1_39_90 Conflicts: autogen.sh configure.ac
Diffstat (limited to 'girepository/gthash.c')
-rw-r--r--girepository/gthash.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/girepository/gthash.c b/girepository/gthash.c
index b50ea6f0..831c87e9 100644
--- a/girepository/gthash.c
+++ b/girepository/gthash.c
@@ -29,7 +29,7 @@
#define ALIGN_VALUE(this, boundary) \
(( ((unsigned long)(this)) + (((unsigned long)(boundary)) -1)) & (~(((unsigned long)(boundary))-1)))
-/**
+/*
* String hashing in the typelib. We have a set of static (fixed) strings,
* and given one, we need to find its index number. This problem is perfect
* hashing: http://en.wikipedia.org/wiki/Perfect_hashing
@@ -158,6 +158,8 @@ _gi_typelib_hash_builder_pack (GITypelibHashBuilder *builder, guint8* mem, guint
g_assert (len >= builder->packed_size);
g_assert ((((unsigned long)mem) & 0x3) == 0);
+ memset (mem, 0, len);
+
*((guint32*) mem) = builder->dirmap_offset;
packed_mem = (guint8*)(mem + sizeof(guint32));
cmph_pack (builder->c, packed_mem);