Hi,

I was playing around with the new multiline functions in mimedefang and I noticed that there was a earth shattering kaboom, ie .. mimedefang would crash. I make some changes and attached a patch to fix it.

I have tested it with small and way big (more than 30 lines) of response and it seems to work. Feel free to edit it / or fix it another way :)

--
Michiel Brandenburg
--- mimedefang.c.original       2009-09-03 23:06:46.000000000 +0200
+++ mimedefang.c        2010-02-01 23:34:59.000000000 +0100
@@ -368,8 +368,9 @@ do_reply(SMFICTX *ctx, char const *code,
     }

     /* Convert remaining newlines to spaces */
-    while(*s) {
+    while(s && *s) {
        if (*s == '\n') *s = ' ';
+       s++;
     }

     /* Sigh... wtf were milter developers thinking??? */
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list [email protected]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to