Skip to content

Commit

Permalink
Special-case optimization in __PHYSFS_verifySecurity().
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Aug 22, 2002
1 parent 593db4b commit 2e0c0fa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions physfs.c
Expand Up @@ -1196,7 +1196,6 @@ char * __PHYSFS_convertToDependent(const char *prepend,
int __PHYSFS_verifySecurity(DirHandle *h, const char *fname)
{
int retval = 1;
int fileExists;
char *start;
char *end;
char *str;
Expand Down Expand Up @@ -1224,14 +1223,16 @@ int __PHYSFS_verifySecurity(DirHandle *h, const char *fname)

if (!allowSymLinks)
{
if (h->funcs->isSymLink(h, str, &fileExists))
if (h->funcs->isSymLink(h, str, &retval))
{
__PHYSFS_setError(ERR_SYMLINK_DISALLOWED);
retval = 0;
break;
} /* if */

/* !!! FIXME: Abort early here if !fileExists? */
/* break out early if path element is missing. */
if (!retval)
break;
} /* if */

if (end == NULL)
Expand Down

0 comments on commit 2e0c0fa

Please sign in to comment.