fuse_opt_parse() was using uninitialized struct fuse_opt_option::data,
this bug made fuse_opt_proc_t not work, if it used first ``data'' argument, and might cause memory corruption even.
This commit is contained in:
parent
c6cd7e8f80
commit
fd45f5444a
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: refuse_opt.c,v 1.14 2009/01/19 09:56:06 lukem Exp $ */
|
||||
/* $NetBSD: refuse_opt.c,v 1.15 2011/03/01 11:23:42 soda Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 Juan Romero Pardines.
|
||||
@ -282,6 +282,7 @@ fuse_opt_parse(struct fuse_args *args, void *data,
|
||||
if (!args || !args->argv || !args->argc || !proc)
|
||||
return 0;
|
||||
|
||||
foo.data = data;
|
||||
if (args->argc == 1)
|
||||
return proc(foo.data, *args->argv, FUSE_OPT_KEY_OPT, args);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user