diff options
Diffstat (limited to 'ftpfs')
-rw-r--r-- | ftpfs/ftpfs.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ftpfs/ftpfs.c b/ftpfs/ftpfs.c index 09c072d1..393cc5ba 100644 --- a/ftpfs/ftpfs.c +++ b/ftpfs/ftpfs.c @@ -272,14 +272,16 @@ parse_startup_opt (int key, char *arg, struct argp_state *state) ftpfs_remote_root = sep + 1; /* Lookup the ftp server (the part before the `:'). */ - *sep = '\0'; + if (sep) + *sep = '\0'; err = lookup_server (ftpfs_remote_fs, &ftpfs_ftp_params, &h_err); if (err == EINVAL) argp_failure (state, 10, 0, "%s: %s", ftpfs_remote_fs, hstrerror (h_err)); else if (err) argp_failure (state, 11, err, "%s", ftpfs_remote_fs); - *sep = ':'; + if (sep) + *sep = ':'; } case ARGP_KEY_INIT: |