You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by pq...@apache.org on 2005/10/13 19:47:24 UTC

svn commit: r320825 - /httpd/mod_mbox/trunk/module-2.0/mod_mbox.c

Author: pquerna
Date: Thu Oct 13 10:47:20 2005
New Revision: 320825

URL: http://svn.apache.org/viewcvs?rev=320825&view=rev
Log:
strstr can return NULL, so don't crash when we get weird URLs loaded.

Modified:
    httpd/mod_mbox/trunk/module-2.0/mod_mbox.c

Modified: httpd/mod_mbox/trunk/module-2.0/mod_mbox.c
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/trunk/module-2.0/mod_mbox.c?rev=320825&r1=320824&r2=320825&view=diff
==============================================================================
--- httpd/mod_mbox/trunk/module-2.0/mod_mbox.c (original)
+++ httpd/mod_mbox/trunk/module-2.0/mod_mbox.c Thu Oct 13 10:47:20 2005
@@ -194,8 +194,9 @@
 
     baseURI = apr_pstrdup(r->pool, r->uri);
     temp = strstr(baseURI, r->path_info);
-    *temp = '\0';
-
+    if (temp) {
+        *temp = '\0';
+    }
     return baseURI;
 }