Author: rjung Date: Tue Dec 23 20:01:45 2014 New Revision: 1647660 URL: http://svn.apache.org/r1647660 Log: PR 54596: IIS: Fix missing last character when parsing relative file names with no ".." directory components from configuration.
Modified: tomcat/jk/trunk/native/iis/jk_isapi_plugin.c tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml Modified: tomcat/jk/trunk/native/iis/jk_isapi_plugin.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/iis/jk_isapi_plugin.c?rev=1647660&r1=1647659&r2=1647660&view=diff ============================================================================== --- tomcat/jk/trunk/native/iis/jk_isapi_plugin.c (original) +++ tomcat/jk/trunk/native/iis/jk_isapi_plugin.c Tue Dec 23 20:01:45 2014 @@ -2573,7 +2573,8 @@ static int init_logger(int rotate) if (strchr(log_file, '%')) { struct tm *tm_now; - /* If there are %s in the log file name, treat it as a sprintf format */ + /* If there are % format patterns in the log file name, + * treat it as a strftime format */ tm_now = localtime(&t); strftime(log_file_name, sizeof(log_file_name_buf), log_file, tm_now); } @@ -3824,7 +3825,10 @@ static char *path_merge(const char *root sz = strlen(merge); /* Normalize path */ if ((rel = relative_path(merge, sz))) { - size_t bl = strlen(root) + sz + 1; + /* one additkional byte for trailing '\0', + * one additional byte for eventual path + * separator between root and merge */ + size_t bl = strlen(root) + sz + 2; out = malloc(bl); if (out == 0) return 0; Modified: tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml?rev=1647660&r1=1647659&r2=1647660&view=diff ============================================================================== --- tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml (original) +++ tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml Tue Dec 23 20:01:45 2014 @@ -107,6 +107,11 @@ recovery attempt time instead of original error time after the first recovery attempt. (rjung) </fix> + <fix> + <bug>54596</bug>: IIS: Fix missing last character when parsing + relative file names with no ".." directory components from + configuration. (rjung) + </fix> </changelog> </subsection> </section> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org