]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - windows/winsftp.c
Stop using MS-deprecated names stricmp and strnicmp.
[PuTTY.git] / windows / winsftp.c
index 525f0bf25e0adb0c73dbd68237a2b6daa963bbe7..c85c24aaa373fef54b967b5f02ae99f9c10fdd1f 100644 (file)
@@ -244,7 +244,7 @@ int seek_file(WFile *f, uint64 offset, int whence)
 uint64 get_file_posn(WFile *f)
 {
     uint64 ret;
-    LONG lo, hi;
+    LONG lo, hi = 0;
 
     lo = SetFilePointer(f->h, 0L, &hi, FILE_CURRENT);
     ret.lo = lo;
@@ -749,21 +749,6 @@ char *ssh_sftp_get_cmdline(const char *prompt, int no_fds_ok)
 
 void platform_psftp_post_option_setup(void)
 {
-#if !defined UNPROTECT && !defined NO_SECURITY
-    /*
-     * Protect our process.
-     */
-    {
-        char *error = NULL;
-        if (!setprocessacl(error)) {
-            char *message = dupprintf("Could not restrict process ACL: %s",
-                                      error);
-            logevent(NULL, message);
-            sfree(message);
-            sfree(error);
-        }
-    }
-#endif
 }
 
 /* ----------------------------------------------------------------------
@@ -773,6 +758,8 @@ int main(int argc, char *argv[])
 {
     int ret;
 
+    dll_hijacking_protection();
+
     ret = psftp_main(argc, argv);
 
     return ret;