apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: [PATCH]: apr_filepath_merge on Windows handes ..\..\.. incorrectly. (is Subversion issue 1869)
Date Sun, 23 Jul 2006 20:19:36 GMT
Lieven Govaerts wrote:
> --- file_io/win32/filepath.c	(revision 422522)
> +++ file_io/win32/filepath.c	(working copy)
> @@ -673,7 +673,7 @@
>                   */
>              }
>              else if (pathlen == 0 ||
> -                     (pathlen >= 3 && (pathlen == 3
> +                     (pathlen >= 3 && (pathlen % 3 == 0
>                                      || path[pathlen - 4] == ':')
>                                     &&  path[pathlen - 3] == '.' 
>                                     &&  path[pathlen - 2] == '.' 

-1 on this specific solution; you are entrusting that path[]'s triplets are
all ../ patterns which definitely isn't a robust test.

There's something deeper going on here, +1 on your test, I'll get that applied
in the next day if nobody beats me to it, so we better ensure this is properly
fixed before release.

This is a great catch - thank you for your report!

Bill

Mime
View raw message