Package: libgpgme11 Version: 1.1.8-2 Severity: important Tags: patch This is really incorrect, since it makes gpgme work for years for most of it's users, but not for all.
Look at posix-io.c, there is array notify_table. Just can you explain, why it have 256 elements, but not, say 257 or 258? :) Maybe there should be something like FD_SETSIZE and a sound error message if a filedescriptor does not fit into notify_table? (Yes, FD_SETSIZE is larger than 256 on my system, and perhaps on your system too.) That will be OK, since filedescriptors are later used in select() and every fd > FD_SETSIZE makes no sense for us. Why this bug is so bad? Because it will be hard to reproduce it in laboratory environment with everything except gpgme itself cut off, gpgme creates very little number of fds by itself. So it silently emerges only when used inside very busy application with more than 256 files open simultaneously. With patch applied it will SILENTLY fail only when there are more than FD_SETSIZE file open. It is not-OKAY-but-works-for-me patch :( Yet there should be some error notification instead of GPG_ERR_GENERAL. Thanks. -- System Information: Debian Release: 5.0 APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.6.18-spg (SMP w/2 CPU cores; PREEMPT) Locale: LANG=C, LC_CTYPE=ru_RU.KOI8-R (charmap=KOI8-R) Shell: /bin/sh linked to /bin/bash Versions of packages libgpgme11 depends on: ii gnupg 1.4.9-3 GNU privacy guard - a free PGP rep ii libc6 2.7-18 GNU C Library: Shared libraries ii libgpg-error0 1.4-2 library for common error values an ii libpth20 2.0.7-12 The GNU Portable Threads libgpgme11 recommends no packages. Versions of packages libgpgme11 suggests: ii gpgsm 2.0.9-3.1 GNU privacy guard - S/MIME version -- no debconf information
--- src/posix-io.c~ 2008-12-23 21:24:42.000000000 +0400 +++ src/posix-io.c 2009-02-02 14:16:50.000000000 +0400 @@ -77,7 +77,7 @@ { _gpgme_close_notify_handler_t handler; void *value; -} notify_table[256]; +} notify_table[FD_SETSIZE]; int