diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2007-01-18 16:08:21 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2007-01-18 16:08:21 +0000 |
commit | 05c126c670a34c1a4ae18f606ae470ee995b72e8 (patch) | |
tree | 0a3006fd7c5e4adcb5833525ca38d42336f09e74 | |
parent | fac7b10214e25bc444ca947b770a9ae8227aaa79 (diff) | |
download | fuse-05c126c670a34c1a4ae18f606ae470ee995b72e8.tar.gz |
Fix abort in fuse_new() compatibility API for opts == NULL case
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/fuse.c | 5 |
2 files changed, 8 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2007-01-18 Miklos Szeredi <miklos@szeredi.hu> + + * Fix abort in fuse_new() compatibility API for opts == NULL case. + Novell bugzilla #233870. Patch from Takashi Iwai. + 2007-01-02 Miklos Szeredi <miklos@szeredi.hu> * Fix unaligned access in file desctriptor passing in libfuse, @@ -2948,9 +2948,10 @@ static struct fuse *fuse_new_common_compat(int fd, const char *opts, struct fuse *f; struct fuse_args args = FUSE_ARGS_INIT(0, NULL); + if (fuse_opt_add_arg(&args, "") == -1) + return NULL; if (opts && - (fuse_opt_add_arg(&args, "") == -1 || - fuse_opt_add_arg(&args, "-o") == -1 || + (fuse_opt_add_arg(&args, "-o") == -1 || fuse_opt_add_arg(&args, opts) == -1)) { fuse_opt_free_args(&args); return NULL; |