From: Bradley Nicholes Date: Wed, 12 Feb 2003 22:52:32 +0000 (+0000) Subject: Make sure that the file extension is at least an empty string rather than NULL X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71448a14f376005c0bd8ccd19944fc7113cdea8c;p=thirdparty%2Fapache%2Fhttpd.git Make sure that the file extension is at least an empty string rather than NULL 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 --- diff --git a/modules/arch/netware/mod_netware.c b/modules/arch/netware/mod_netware.c index f95bda26be2..be111d0493a 100644 --- a/modules/arch/netware/mod_netware.c +++ b/modules/arch/netware/mod_netware.c @@ -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 == '.')