diff src/undo.c @ 6771:63b2bc619d5a v7.4.707

patch 7.4.707 Problem: Undo files can have their executable bit set. Solution: Strip of the executable bit. (Mikael Berthe)
author Bram Moolenaar <bram@vim.org>
date Tue, 21 Apr 2015 16:12:06 +0200
parents 290631797b76
children 0b6c37dd858d
line wrap: on
line diff
--- a/src/undo.c
+++ b/src/undo.c
@@ -1614,8 +1614,8 @@ u_write_undo(name, forceit, buf, hash)
 #endif
     }
 
-    /* strip any s-bit */
-    perm = perm & 0777;
+    /* strip any s-bit and executable bit */
+    perm = perm & 0666;
 
     /* If the undo file already exists, verify that it actually is an undo
      * file, and delete it. */