httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From max...@apache.org
Subject svn commit: r292993 - /httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mbox_parse.c
Date Sat, 01 Oct 2005 16:11:39 GMT
Author: maxime
Date: Sat Oct  1 09:11:35 2005
New Revision: 292993

URL: http://svn.apache.org/viewcvs?rev=292993&view=rev
Log:
Backport r239425 from trunk.

Modified:
    httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mbox_parse.c

Modified: httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mbox_parse.c
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mbox_parse.c?rev=292993&r1=292992&r2=292993&view=diff
==============================================================================
--- httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mbox_parse.c (original)
+++ httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mbox_parse.c Sat Oct  1 09:11:35 2005
@@ -750,6 +750,13 @@
     {
 #ifdef APR_HAS_MMAP
         msgc.body_end = b.b - b.sb;
+	/* With mmap, we can hit a file that brings the From check to the very
+	 * end of the mmap region - hence a dangling pointer (likely SEGV).
+	 * Therefore, break out of the loop first.
+	 */
+	if (msgc.body_end == b.maxlen) {
+	    break;
+	}
 #else
         msgc.body_end = b.totalread - b.len + b.b - b.rb;
 #endif



Mime
View raw message