Commit 3a4d69de authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Missed one error case

parent 8a474a2a
/*****************************************************************************
* tls.c
* gnutls.c
*****************************************************************************
* Copyright (C) 2004-2006 Rémi Denis-Courmont
* $Id$
......@@ -441,7 +441,8 @@ gnutls_Addx509Directory( vlc_object_t *p_this,
* symbolic link (to avoid possibly infinite recursion), and verifies
* that the inode is still the same, to avoid TOCTOU race condition.
*/
if( fstat( fd, &st1 ) || utf8_lstat( psz_dirname, &st2 )
if( ( fd == -1)
|| fstat( fd, &st1 ) || utf8_lstat( psz_dirname, &st2 )
|| S_ISLNK( st2.st_mode ) || ( st1.st_ino != st2.st_ino ) )
{
closedir( dir );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment