From 22c4e6219fe3a2296ce0a7fcbdc830d68c320b16 Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Fri, 1 Nov 2002 03:27:20 +0000 Subject: [PATCH] Fix a trailing slash/last filename truncation bug observed on Linux, which affected DAV MOVE operations and even general file access. PR 14147, 10687, 10236 [Dan Good ] 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/request.c b/server/request.c index 73ff7ff7c4..33e55087f6 100644 --- a/server/request.c +++ b/server/request.c @@ -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'; } -- 2.50.1