wrowe 2002/12/31 10:03:41
Modified: file_io/win32 filepath.c
Log:
We can't optimize away this test! Just because a path didn't contain
backslashes doesn't mean that both paths were not absolute.
There probably is a 'safe' optimization for that block, but I'm not
seeing it this morning.
Revision Changes Path
1.32 +1 -1 apr/file_io/win32/filepath.c
Index: filepath.c
===================================================================
RCS file: /home/cvs/apr/file_io/win32/filepath.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- filepath.c 28 Dec 2002 20:41:58 -0000 1.31
+++ filepath.c 31 Dec 2002 18:03:41 -0000 1.32
@@ -834,7 +834,7 @@
* is still within given basepath. Note that the root path
* segment is thoroughly tested prior to path parsing.
*/
- if (flags & APR_FILEPATH_NOTABOVEROOT && (keptlen - rootlen) < baselen) {
+ if (flags & APR_FILEPATH_NOTABOVEROOT) {
if (memcmp(basepath, path + rootlen, baselen))
return APR_EABOVEROOT;