secmem: Fix SEGV and stat calculation.
authorNIIBE Yutaka <gniibe@fsij.org>
Fri, 2 Jun 2017 01:34:42 +0000 (10:34 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Fri, 2 Jun 2017 01:34:42 +0000 (10:34 +0900)
commite0958debe1a7db1bec1283115cdc6a14bf3b43e5
tree291bd035e54f94ddf74130b527f275d7df41fa60
parent5a22de904a0a366ae79f03ff1e13a1232a89e26b
secmem: Fix SEGV and stat calculation.

* src/secmem (init_pool): Care about the header size.
(_gcry_secmem_malloc_internal): Likewise.
(_gcry_secmem_malloc_internal): Use mb->size for stats.

--

GnuPG-bug-id: 3027
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
src/secmem.c