httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy T. Fielding" <field...@gbiv.com>
Subject Re: svn commit: r366174 - /httpd/mod_mbox/trunk/module-2.0/mod_mbox_mime.c
Date Fri, 06 Jan 2006 00:39:16 GMT
On Jan 5, 2006, at 4:49 AM, maxime@apache.org wrote:

> +	 In order to handle empty boundaries, we'll look for the
> +	 boundary plus the \n. */
> +
> +	boundary_line = apr_pstrcat(p, "--", mail->boundary, "\n", NULL);
>
>  	/* The start boundary */
> -	bound = ap_strstr(mail->body, mail->boundary);
> +	bound = ap_strstr(mail->body, boundary_line);

That seems a bit risky -- MIME parts are supposed to have CRLF for
line terminators, but that code will only search for LF on Unix.

Would it make more sense to use a regex?

....Roy


Mime
View raw message