Christian Stuellenberg wrote:
Hello cyrus-developers, Hello cyrus-user,
I think I found a bug in lmtpengine.c. In function savemsg with defined SSL xrealloc is used and may move the old pointer p to a new memory segment. So it may be, that the pointers contained in the array fold point to an old memory segment and they are not sufficient for pointer calculation afterwards.
Good catch!
I understand your patch and I'm sure it works, but I think simply calculating the size of tls_info before xmalloc'ing the buffer makes things a lot easier than maintaining two offsets. I just committed the following patch instead:
https://bugzilla.andrew.cmu.edu/cgi-bin/cvsweb.cgi/src/cyrus/imap/lmtpengine.c.diff?r1=1.114&r2=1.115
-- Kenneth Murchison Oceana Matrix Ltd. Software Engineer 21 Princeton Place 716-662-8973 x26 Orchard Park, NY 14127 --PGP Public Key-- http://www.oceana.com/~ken/ksm.pgp --- Cyrus Home Page: http://asg.web.cmu.edu/cyrus Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html