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/08/18 00:45:36 UTC

svn commit: r233268 - /httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_file.c

Author: maxime
Date: Wed Aug 17 15:45:32 2005
New Revision: 233268

URL: http://svn.apache.org/viewcvs?rev=233268&view=rev
Log:
Backporting SIGSEGV protection from Paul's fix on mod_mbox's trunk
(r233127).

 * module-2.0/mod_mbox_file.c:
    (fetch_context_msgids): do not look for thread context if
calculate_thread returned NULL.


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

Modified: httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_file.c
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_file.c?rev=233268&r1=233267&r2=233268&view=diff
==============================================================================
--- httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_file.c (original)
+++ httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_file.c Wed Aug 17 15:45:32 2005
@@ -183,14 +183,16 @@
 
     /* And the MBOX_PREV_THREAD and MBOX_NEXT_THREAD ones */
     threads = calculate_threads(r->pool, head);
-    c = find_prev_thread(r, msgID, threads);
-    if (c && c->message) {
-        context[2] = c->message->msgID;
-    }
+    if (threads) {
+        c = find_prev_thread(r, msgID, threads);
+	if (c && c->message) {
+	    context[2] = c->message->msgID;
+	}
 
-    c = find_next_thread(r, msgID, threads);
-    if (c && c->message) {
-        context[3] = c->message->msgID;
+	c = find_next_thread(r, msgID, threads);
+	if (c && c->message) {
+	    context[3] = c->message->msgID;
+	}
     }
 
     return context;