OpenDir(NULL, ...)

Tim Potter Tim.Potter at anu.edu.au
Sun May 2 23:03:53 GMT 1999


Jean Francois Micouleau writes:

> > While investigating some core dump problems in HEAD I've just seen two
> > places where we have OpenDir(NULL, ...), which is not healthy as
> > OpenDir starts with:
> > 
> >   DIR *p = conn->vfs_ops.opendir(name);
> > 
> > One case is in printing/nt_printing.c (where we want to open a driver
> > configuration directory),
> 
> I corrected this one locally. I'll commit it.

I think I'll put some checks in the VFS code to see if NULLs are
passed as parameters to avoid this in the future.  What would be a
good idea when an assertion like this fails?  abort()?  log a debug(0,
...)  message?


Tim.

> J.F.

-- 
Tim Potter, System Admin/Programmer, Head Bee Guy
Advanced Computational Systems CRC, RSISE Bldg Australian National University,
Canberra 0200, AUSTRALIA Ph: +61 2 62798813 Fax: +61 2 62798602


More information about the samba-technical mailing list