diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2005-02-09 09:46:04 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2005-02-09 09:46:04 +0000 |
commit | b31885531595665081fe79cd0e7e4ede452c1d2d (patch) | |
tree | 1a95a012b46c350cc4f789543c335dff767ca580 | |
parent | da058cf9da38115651e5dc313ba537e2a861b836 (diff) | |
download | sshfs-b31885531595665081fe79cd0e7e4ede452c1d2d.tar sshfs-b31885531595665081fe79cd0e7e4ede452c1d2d.tar.gz sshfs-b31885531595665081fe79cd0e7e4ede452c1d2d.tar.bz2 sshfs-b31885531595665081fe79cd0e7e4ede452c1d2d.zip |
fix
-rw-r--r-- | opts.c | 2 | ||||
-rw-r--r-- | sshfs.c | 7 |
2 files changed, 4 insertions, 5 deletions
@@ -51,7 +51,7 @@ static int process_option_group(char *arg, struct opt opts[], remove_one = process_option(arg, opts, case_sensitive); if (remove_one) { if (comma) - memmove(arg, comma + 1, strlen(comma + 1)); + memmove(arg, comma + 1, strlen(comma + 1) + 1); } else { remove = 0; if (comma) @@ -773,8 +773,7 @@ static int sftp_request(uint8_t type, const struct buffer *buf, buf_free(&req->reply); sem_destroy(&req->ready); free(req); - return err; - + return err; } static int sshfs_getattr(const char *path, struct stat *stbuf) @@ -1184,12 +1183,12 @@ int main(int argc, char *argv[]) break; default: - newargv[newargc++] = arg; + newargv[newargc++] = strdup(arg); } } else if (!host && strchr(arg, ':')) host = g_strdup(arg); else - newargv[newargc++] = arg; + newargv[newargc++] = strdup(arg); } if (!host) { fprintf(stderr, "missing host\n"); |