On 17/10/17(Tue) 15:30, Helg Bredow wrote:
> If you execute "fuse-zip -V" it prints the version and then dumps core. This 
> is because fuse-zip does not initialise the mount point pointer to NULL. This 
> patch ensures that it's always initialised to NULL.

It's hard to understand your fix if you don't explain what "dumps core".

I had to install the package and look at the trace myself.  You could
save me these tasks by either posting the backtrace, saying that free(3)
is call on an uninitialized memory or both.

That said, I'd suggest different fix.  Initializing `mp' in fuse_setup()
is very fragile.  Instead I'd declare a local variable and don't use
`mp' at all in these function.
In case of sucsses, just before returning the "struct fuse" pointer I'd
assign *mp, if not NULL, to the local variable.

By the way, what does "mp" stand for?  I find the name confusing.

> Index: fuse.c
> ===================================================================
> RCS file: /cvs/src/lib/libfuse/fuse.c,v
> retrieving revision 1.29
> diff -u -p -u -p -r1.29 fuse.c
> --- fuse.c    21 Aug 2017 21:41:13 -0000      1.29
> +++ fuse.c    17 Oct 2017 15:21:05 -0000
> @@ -468,6 +468,7 @@ fuse_setup(int argc, char **argv, const 
>       struct fuse *fuse;
>       int fg;
>  
> +     *mp = NULL;
>       if (fuse_parse_cmdline(&args, mp, mt, &fg))
>               goto err;
>  
> 

Reply via email to