Ok, here is a patch that puts the fix in spc_rpc and spc_walk. I need the fix in spc_walk also since spc_open calls spc_walk before it calls spc_rpc.
Signed-off-by: Hugh Greenberg <[EMAIL PROTECTED]> On Wed, 2008-09-24 at 12:18 -0600, Latchesar Ionkov wrote: > It doesn't seem like the right solution to me. I think it the fix > should be in spc_rpc. > > Thanks, > Lucho > > On Sep 24, 2008, at 12:18 PM, Hugh Greenberg wrote: > > > This patch prevents a segfault caused by spc_open and spc_clunk if the > > filesystem was previously disconnected by spc_disconnect_fsys . > > > > Signed-off-by: Hugh Greenberg <[EMAIL PROTECTED]> > > > > <open.patch> >
Index: walk.c =================================================================== --- walk.c (revision 695) +++ walk.c (working copy) @@ -39,6 +39,9 @@ Spfcall *tc, *rc; Spcfid *fid; + if (fs->fd < 0) + return NULL; + while (*path == '/') path++; Index: fsys.c =================================================================== --- fsys.c (revision 695) +++ fsys.c (working copy) @@ -566,6 +566,9 @@ char *ename; Spcrpc r; + if (fs->fd < 0) + return -1; + if (rc) *rc = NULL;
