]> granicus.if.org Git - apache/commitdiff
Make sure that the file extension is at least an empty string rather than NULL
authorBradley Nicholes <bnicholes@apache.org>
Wed, 12 Feb 2003 22:52:32 +0000 (22:52 +0000)
committerBradley Nicholes <bnicholes@apache.org>
Wed, 12 Feb 2003 22:52:32 +0000 (22:52 +0000)
so that the table searches will function properly

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98635 13f79535-47bb-0310-9956-ffa450edef68

modules/arch/netware/mod_netware.c

index f95bda26be2343fe40fd277ff5f02dc2b5bbccf4..be111d0493a6fc11ba477c48baa99c48902292e0 100644 (file)
@@ -171,6 +171,11 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv,
 
     /* Figure out what the extension is so that we can matche it. */
     ext = strrchr(apr_filename_of_pathname(cmd_only), '.');
+
+    /* If there isn't an extension then give it an empty string */
+    if (!ext) {
+        ext = "";
+    }
     
     /* eliminate the '.' if there is one */
     if (*ext == '.')