[PATCH] FIX vfs_recycle.c seg fault

Stefan (metze) Metzmacher metze at metzemix.de
Tue Apr 8 05:16:27 GMT 2003


At 07:11 08.04.2003 +0200, Jelmer Vernooij wrote:
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>On Tuesday 08 April 2003 00:48, Simo wrote:
> > On Mon, 2003-04-07 at 20:27, Stefan Metzmacher wrote:
> > > At 20:16 07.04.2003 +0200, Jelmer Vernooij wrote:
> > > >-----BEGIN PGP SIGNED MESSAGE-----
> > > >Hash: SHA1
> > > >
> > > >On Monday 07 April 2003 18:57, Stefan (metze) Metzmacher wrote:
> > > > > HI all,
> > > > >
> > > > > here's a small patch with prevends vfs_recycle.c from segfaulting
> > > > > when 'keep dir tree  = True'
> > > > >
> > > > > and fixes the prototype of unlink_internal to get a pstring instead
> > > > > of char *
> > > >
> > > >Why use a seperate malloc and not just a pstring there as well?
> > > I would also preferr this too, but I don't want the code too much.
> > NO, please! Keep using malloced buffers in new code if possible.
>I'm fine with both, but the current code does malloc(PATH_MAX). Replace that
>with either a 'real' pstring or do a 'real' malloc.

here we need a PATH_MAX buffer or we need realloc when we cat more chars at 
the end of the malloced buffer.

so in this case I would also preferr a pstring,
BUT I will not touch this and let it up to Simo :-)



metze
-----------------------------------------------------------------------------
Stefan "metze" Metzmacher <metze at metzemix.de> 



More information about the samba-technical mailing list