On Tue, 18 Aug 2009, Jakub Wilk wrote:

> * Santiago Vila <sanv...@unex.es>, 2009-08-18, 01:25:
> > On a chroot etch system running a lenny kernel, the bug seems to be
> > gone as well.
> > 
> > Seems like a kernel bug to me.
> 
> I strongly doubt it's a kernel bug, rather a non-deterministic bug in
> procmail. I've been able to reproduce it on Linux 2.6.30-1-686 with libc6s
> 2.3.6.ds1-13etch9+b1, 2.7-18 and 2.9-25.

You are right. I can finally reproduce it on a i386 chroot using
the usual 2.6.26-2-amd64 kernel from lenny.

Based on the analysis by Samuel Thibault of Bug#484352, which is very
similar, I think the following patch might fix both bugs:

diff -ru procmail-3.22/src/mailfold.c ASASAS/src/mailfold.c
--- procmail-3.22/src/mailfold.c        2009-09-01 18:29:18.000000000 +0200
+++ ASASAS/src/mailfold.c       2009-08-21 22:54:13.000000000 +0200
@@ -205,7 +205,7 @@
   if(linkfolder)                   /* any additional directories specified? */
    { size_t blen;
      if(blen=Tmnate-linkfolder)                       /* copy the names into 
safety */
-       Tmnate=(linkfolder=tmemmove(malloc(blen),linkfolder,blen))+blen;
+       Tmnate=(linkfolder=tmemmove(malloc(blen+1),linkfolder,blen))+blen;
      else
        linkfolder=0;
    }

Could you please try it and tell me whether it improve things or not?

Thanks.



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to