This is the mail archive of the cygwin-cvs@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[newlib-cygwin] cygcheck: Fix check for Cygwin symlink


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=7909b528e57b2f2a77f3afde0f73e0b93ebc345a

commit 7909b528e57b2f2a77f3afde0f73e0b93ebc345a
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Sat Oct 22 22:44:25 2016 +0200

    cygcheck: Fix check for Cygwin symlink
    
    Fixes Coverity CID 66904 and 66906
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/utils/path.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/winsup/utils/path.cc b/winsup/utils/path.cc
index 4877f6a..336408d 100644
--- a/winsup/utils/path.cc
+++ b/winsup/utils/path.cc
@@ -163,7 +163,7 @@ is_symlink (HANDLE fh)
     }
   else /* magic == SYMLINK_MAGIC */
     {
-      if (!local.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM)
+      if (!(local.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM))
 	goto out; /* Not a Cygwin symlink. */
       char buf[sizeof (SYMLINK_COOKIE) - 1];
       SetFilePointer (fh, 0, 0, FILE_BEGIN);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]