[prev in list] [next in list] [prev in thread] [next in thread] 

List:       proftpd-committers
Subject:    [ProFTPD-committers] CVS: proftpd/src fsio.c,1.46,1.47
From:       TJ Saunders <castaglia () users ! sourceforge ! net>
Date:       2005-10-26 16:34:31
Message-ID: E1EUoER-0008Mh-Vv () sc8-pr-cvs1 ! sourceforge ! net
[Download RAW message or body]

Update of /cvsroot/proftp/proftpd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32063/src

Modified Files:
	fsio.c 
Log Message:

When cleaning the path in pr_insert_fs(), only add a trailing path
separator if the original path had one _and_ the current cleaned path does
_not_ have one.  Thanks to Patrick McHardy for pointing this out.


Index: fsio.c
===================================================================
RCS file: /cvsroot/proftp/proftpd/src/fsio.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- fsio.c	26 Oct 2005 16:19:16 -0000	1.46
+++ fsio.c	26 Oct 2005 16:34:29 -0000	1.47
@@ -801,7 +801,8 @@
       size_t len = strlen(cleaned_path);
 
       if (len > 1 &&
-          len < (PR_TUNABLE_PATH_MAX-3)) {
+          len < (PR_TUNABLE_PATH_MAX-3) &&
+          cleaned_path[len-1] != '/') {
         cleaned_path[len] = '/';
         cleaned_path[len+1] = '\0';
       }



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
ProFTPD Committers Mailing List
proftpd-committers@proftpd.org
https://lists.sourceforge.net/lists/listinfo/proftp-committers
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic