Package: gbuffy
Version: 0.2.6-11
Severity: normal
I've got a file descriptor leak on a couple of mbox mailboxes that
started out life as an mbox archive from a mailing list, with missing
To: addresses and munged From addresses:
>From judd.t at orbitalsystems.com Mon Oct 1 06:35:53 2007
From: judd.t at orbitalsystems.com (Judd Taylor)
Date: Mon Oct 1 06:48:10 2007
Subject: [Pdl-porters] Module::Build, still interested?
Message-ID: <[EMAIL PROTECTED]>
X-IMAPbase: 1193798150 35
Status: RO
X-Status: D
X-Keywords:
X-UID: 1
I can see one locations in count.c where there is a likely leak:
line 101:
/* Check if a folder by checking for From as first thing in file */
fgets(buffer, sizeof (buffer), fp);
if (!is_from(buffer, garbage, sizeof (garbage)))
return 0;
will not close the file that was previously opened is is_from is false.
I guess it's failing that because the from lines are not compliant
with rfc822. Whilst that's not a problem, valid emails get appended
to that mailbox now, which gbuffy counts, but alas, things go bad when
it runs out of fds.
Does that sound about right?
Patch is obvious:
--- count.c.bak 2003-10-10 18:14:25.000000000 +1000
+++ count.c 2007-11-06 13:57:03.000000000 +1100
@@ -130,8 +130,10 @@
/* Check if a folder by checking for From as first thing in file */
fgets(buffer, sizeof (buffer), fp);
- if (!is_from(buffer, garbage, sizeof (garbage)))
+ if (!is_from(buffer, garbage, sizeof (garbage))) {
+ fclose(fp);
return 0;
+ }
mbox->num_messages = 1;
mbox->new_messages = 0;
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1,
'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.18-4-686 (SMP w/1 CPU core)
Locale: LANG=en_AU, LC_CTYPE=en_AU (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash
Versions of packages gbuffy depends on:
ii libc6 2.6.1-6 GNU C Library: Shared libraries
ii libcompfaceg1 1:1.5.2-4 Compress/decompress images for mai
ii libglib1.2ldbl 1.2.10-19 The GLib library of C routines
ii libgtk1.2 1.2.10-18.1 The GIMP Toolkit set of widgets fo
ii libssl0.9.8 0.9.8g-2 SSL shared libraries
ii libx11-6 2:1.0.3-7 X11 client-side library
ii libxext6 1:1.0.3-2 X11 miscellaneous extension librar
ii libxi6 2:1.1.3-1 X11 Input extension library
gbuffy recommends no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]