delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1998/09/21/02:22:00

From: corinna DOT vinschen AT cityweb DOT de (Corinna Vinschen)
Subject: path.cc
21 Sep 1998 02:22:00 -0700 :
Message-ID: <3606144D.5B3436C6.cygnus.cygwin32.developers@cityweb.de>
Mime-Version: 1.0
To: cygwin32-developers AT cygnus DOT com

Hi,

I have found a problem in path.cc. In function
'symlink_check_one' a file is opened and, if it's
not a symlink file, it will not be closed again.

Bye,
Corinna

---------- snip ----------
*** path.cc.orig       Mon Sep 21 10:32:19 1998
--- path.cc     Mon Sep 21 10:50:27 1998
*************** symlink_check_one (const char *in_path,
*** 1699,1705 ****
                    }
                }
              else
!               goto file_not_symlink;
            }
          else
            {
--- 1699,1708 ----
                    }
                }
              else
!               {
!                 CloseHandle (h);
!                 goto file_not_symlink;
!               }
            }
          else
            {
*************** symlink_check_one (const char *in_path,
*** 1707,1712 ****
--- 1710,1716 ----
              *exec = (got >= 2
                       && cookie_buf[0] == '#'
                       && cookie_buf[1] == '!') ? 1 : 0;
+               CloseHandle (h);
              goto file_not_symlink;
            }
          CloseHandle (h);

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019