]> granicus.if.org Git - apache/commitdiff
Fix a trailing slash/last filename truncation bug observed on Linux,
authorWilliam A. Rowe Jr <wrowe@apache.org>
Fri, 1 Nov 2002 03:27:20 +0000 (03:27 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Fri, 1 Nov 2002 03:27:20 +0000 (03:27 +0000)
  which affected DAV MOVE operations and even general file access.
  PR 14147, 10687, 10236 [Dan Good <debug@gooddan.com>]

  I'm accepting Jeff Trawick's suggestion of twisting the test into an
  assert, since it seems very unlikely (after correctly resetting the flag)
  that this will fault.

Reviewed by:  Jeff Trawick, Will Rowe

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

server/request.c

index 73ff7ff7c49786befb06203cb97d93f191ebd8a7..33e55087f641250376704763749e89885b984a08 100644 (file)
@@ -924,6 +924,8 @@ minimerge2:
             /* That temporary trailing slash was useful, now drop it.
              */
             if (temp_slash) {
+                temp_slash = 0;
+                AP_ASSERT(r->filename[filename_len-1] == '/');
                 r->filename[--filename_len] = '\0';
             }