diff options
-rw-r--r-- | apps/netutils/ftpc/ftpc_filetime.c | 3 | ||||
-rw-r--r-- | apps/netutils/ftpc/ftpc_pwd.c | 10 | ||||
-rw-r--r-- | apps/netutils/ftpc/ftpc_utils.c | 2 |
3 files changed, 11 insertions, 4 deletions
diff --git a/apps/netutils/ftpc/ftpc_filetime.c b/apps/netutils/ftpc/ftpc_filetime.c index a9558f22d..6b3a1d6db 100644 --- a/apps/netutils/ftpc/ftpc_filetime.c +++ b/apps/netutils/ftpc/ftpc_filetime.c @@ -74,7 +74,8 @@ * Name: ftpc_filetime * * Descripton: - * Return the timestamp on the remote file. + * Return the timestamp on the remote file. Returned time is UTC + * (Universal Coordinated Time). * ****************************************************************************/ diff --git a/apps/netutils/ftpc/ftpc_pwd.c b/apps/netutils/ftpc/ftpc_pwd.c index 809002c9b..e8cfaef70 100644 --- a/apps/netutils/ftpc/ftpc_pwd.c +++ b/apps/netutils/ftpc/ftpc_pwd.c @@ -113,9 +113,15 @@ FAR char *ftpc_pwd(SESSION handle) return NULL; } - /* Allocate memory for the path name */ + /* Allocate memory for the path name: + * + * Reply: 257 "/home/gnutt" + * ^start ^end + * + * len = end - start + 1 = 11 (+ NUL terminator) + */ - len = end - start; + len = end - start + 1; pwd = (char *)malloc(len + 1); if (!pwd) { diff --git a/apps/netutils/ftpc/ftpc_utils.c b/apps/netutils/ftpc/ftpc_utils.c index 45994532e..9692cae4f 100644 --- a/apps/netutils/ftpc/ftpc_utils.c +++ b/apps/netutils/ftpc/ftpc_utils.c @@ -182,7 +182,7 @@ void ftpc_stripslash(FAR char *str) if (len > 1) { ptr = str + len - 1; - if (*ptr == '/'); + if (*ptr == '/') { *ptr = '\0'; } |