Forward from FreeBSD-GNATS: pinentry stopped working after qt32 upgrade
Ingo Klöcker
Wed Sep 24 10:14:02 2003
On Wednesday 24 September 2003 09:14, Werner Koch wrote:
> On Wed, 24 Sep 2003 00:58:19 +0200, Michael Nottebrock said:
> > http://www.freebsd.org/cgi/query-pr.cgi?pr=57086 ) and make
> > suggestions as to what could be done to further debug the issue?
>
> This seems to be a common problem with pinentry-qt. We receoved
> several reports of such bugs, yours is the first with detailed
> information. I know not enough about qt to tell you whats going on
> but I remember that someone (Ingo?) remarked that the way the memory
> allocator is overloaded is not reliable.
Well, obviously QString isn't the only class that allocates memory with
new[] and obviously the 16384*4 bytes that are reserved in qt/main.cpp
are not enough to satisfy all the Qt classes that want a piece of the
cake.
The first line in qt_main in qt/main.cpp reads
secmem_init( 16384*4 ); /* this should be enough, if not, increase it!
*/
So I suggest following this comment and trying whether increasing the
amount of secure memory helps. Of course, that's only a workaround. The
real solution would be to make sure that the secure memory is used
exclusively for the passphrase and not for everything else that
allocates memory with new[]. All that needs to be done is to write a
replacement for QLineEdit that's not based on QString but on char*.
Regards,
Ingo