OK, something is definitely wrong with the secmem allocators.
I applied this patch:
diff --git a/secmem/secmem.c b/secmem/secmem.c
index 9a478cf..bf97a2a 100644
+++ b/secmem/secmem.c
@@ -381,11 +381,16 @@ secmem_realloc( void *p, size_t newsize )
+ printf("A: %d\n", mb->size);
+ printf("B: %d\n", mb->size);
+ printf("C: %d\n", mb->size);
+ printf("D: %d\n", mb->size);
+ printf("E: %d\n", mb->size);
}
and ran pinentry-gtk-2 with "getpin" as an input and typed in 32 characters for
the dialog box. at character 16, it printed:
A: 32
B: 32
C: 32
D: 32
E: 32
and at character 32 it printed:
A: 0
B: 0
C: 0
D: 0
E: 0
I'm beginning to suspect that this allocator never worked quite right, and that
1d3583a2562e83496ac515276e9bd63a7f1abbc7 just exposes a flaw in the addressing.