1
0
mirror of https://github.com/adtools/clib2.git synced 2025-12-08 14:59:05 +00:00

lstat would overwrite the passed-in name in lstat_lock with ReadLink

git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14986 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
Thomas Frieden
2005-06-21 15:01:08 +00:00
parent ea09fc96db
commit 2025e39014

View File

@ -1,5 +1,5 @@
/* /*
* $Id: stat_lstat.c,v 1.10 2005-04-24 08:46:37 obarthel Exp $ * $Id: stat_lstat.c,v 1.11 2005-06-21 15:01:08 tfrieden Exp $
* *
* :ts=4 * :ts=4
* *
@ -123,7 +123,8 @@ lstat_lock(const char *name,const int mode,int * link_length)
} }
/* Now ask the file system to resolve the entire path. */ /* Now ask the file system to resolve the entire path. */
result = ReadLink(dvp->dvp_Port,dvp->dvp_Lock,(STRPTR)name,(STRPTR)name,name_size); result = ReadLink(dvp->dvp_Port,dvp->dvp_Lock,(STRPTR)name,(STRPTR)new_name,name_size);
if(result < 0) if(result < 0)
{ {
/* This will return either -1 (resolution error) or -2 /* This will return either -1 (resolution error) or -2