[Libsysio-commit] HEAD: libsysio/src rename.c
Brought to you by:
lward
From: Lee W. <lw...@us...> - 2004-08-09 14:30:10
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9459 Modified Files: rename.c Log Message: From Cray SPR_729681, Sue Kelly, and Kevin Pedretti: A long file name given as target causes a seg fault. The error condition check included the returned "new" pnode. This was not being altered in the path lookup, so contained garbage. That would allow the routine to proceed, dereferencing the garbage pointer. Fixed. Index: rename.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/rename.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -w -b -B -p -r1.7 -r1.8 --- rename.c 27 Jul 2004 15:00:48 -0000 1.7 +++ rename.c 9 Aug 2004 14:30:00 -0000 1.8 @@ -77,7 +77,7 @@ SYSIO_INTERFACE_NAME(rename)(const char */ INTENT_INIT(&intent, INT_UPDPARENT, NULL, NULL); err = _sysio_namei(_sysio_cwd, newpath, ND_NEGOK, &intent, &new); - if (err && !new) + if (err) goto error2; if (old->p_mount->mnt_root == old || old->p_cover || |