In the file maildrop.C there is a variable n that gets allocated with char *n=new char [keywords_s - p + 1]; and deallocated with delete n;
This is not correct, allocations with new (type) [size] must be deallocated with delete [] name. So it must be "delete [] n" instead. See attached patch, please apply. These kinds of issues can be found by testing with address sanitizer (-fsanitize=address in cflags). -- Hanno Böck https://hboeck.de/ mail/jabber: ha...@hboeck.de GPG: FE73757FA60E4E21B937579FA5880072BBB51E42
--- a/libs/maildrop/maildir.C 2015-12-19 18:09:18.000000000 +0100 +++ b/libs/maildrop/maildir.C 2016-09-19 14:23:44.899471296 +0200 @@ -254,11 +254,11 @@ if (libmail_kwmSetName(&kwh, kwm, n) < 0) { - delete n; + delete [] n; libmail_kwmDestroy(kwm); throw strerror(errno); } - delete n; + delete [] n; } char *tmpkname, *newkname;
pgpoU79FgJ4L1.pgp
Description: OpenPGP digital signature
------------------------------------------------------------------------------
_______________________________________________ courier-users mailing list courier-users@lists.sourceforge.net Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users