You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ma...@apache.org on 2005/10/01 18:11:39 UTC
svn commit: r292993 -
/httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mbox_parse.c
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