From: Takashi I. <ti...@su...> - 2007-01-18 15:45:41
|
Hi, When fuse_new() is called with compatible API, it aborts at fuse_opt_insert_arg() due to uninitialized args (argc = 0). The patch below fixes the issue. Reported on Novell bugzilla #233870: https://bugzilla.novell.com/show_bug.cgi?id=233870 Takashi --- --- fuse-2.6.1/lib/fuse.c-dist 2007-01-18 16:32:18.000000000 +0100 +++ fuse-2.6.1/lib/fuse.c 2007-01-18 16:36:27.000000000 +0100 @@ -2948,9 +2948,10 @@ static struct fuse *fuse_new_common_comp 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; |