diff options
Diffstat (limited to 'lib/ftp.c')
-rw-r--r-- | lib/ftp.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1393,7 +1393,8 @@ static CURLcode ftp_state_post_listtype(struct connectdata *conn) /* chop off the file part if format is dir/dir/file */ slashPos = strrchr(lstArg,'/'); - *(slashPos+1) = '\0'; + if(slashPos) + *(slashPos+1) = '\0'; } } |