From 76fc4757ac91ac7947a01fb7b53dddf9a78a01d1 Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Mon, 4 Nov 2013 17:08:47 +0000 Subject: Slackware 14.1 Mon Nov 4 17:08:47 UTC 2013 Slackware 14.1 x86_64 stable is released! It's been another interesting release cycle here at Slackware bringing new features like support for UEFI machines, updated compilers and development tools, the switch from MySQL to MariaDB, and many more improvements throughout the system. Thanks to the team, the upstream developers, the dedicated Slackware community, and everyone else who pitched in to help make this release a reality. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. Have fun! :-) --- source/ap/vim/patches/7.4.009 | 64 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 source/ap/vim/patches/7.4.009 (limited to 'source/ap/vim/patches/7.4.009') diff --git a/source/ap/vim/patches/7.4.009 b/source/ap/vim/patches/7.4.009 new file mode 100644 index 000000000..f5e5fa609 --- /dev/null +++ b/source/ap/vim/patches/7.4.009 @@ -0,0 +1,64 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.009 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.009 +Problem: When a file was not decrypted (yet), writing it may destroy the + contents. +Solution: Mark the file as readonly until decryption was done. (Christian + Brabandt) +Files: src/fileio.c + + +*** ../vim-7.4.008/src/fileio.c 2013-08-05 21:58:03.000000000 +0200 +--- src/fileio.c 2013-08-25 17:45:27.000000000 +0200 +*************** +*** 2926,2934 **** +--- 2926,2939 ---- + int *did_ask; /* flag: whether already asked for key */ + { + int method = crypt_method_from_magic((char *)ptr, *sizep); ++ int b_p_ro = curbuf->b_p_ro; + + if (method >= 0) + { ++ /* Mark the buffer as read-only until the decryption has taken place. ++ * Avoids accidentally overwriting the file with garbage. */ ++ curbuf->b_p_ro = TRUE; ++ + set_crypt_method(curbuf, method); + if (method > 0) + (void)blowfish_self_test(); +*************** +*** 2977,2982 **** +--- 2982,2989 ---- + *sizep -= CRYPT_MAGIC_LEN + salt_len + seed_len; + mch_memmove(ptr, ptr + CRYPT_MAGIC_LEN + salt_len + seed_len, + (size_t)*sizep); ++ /* Restore the read-only flag. */ ++ curbuf->b_p_ro = b_p_ro; + } + } + /* When starting to edit a new file which does not have encryption, clear +*** ../vim-7.4.008/src/version.c 2013-08-25 17:01:36.000000000 +0200 +--- src/version.c 2013-08-25 17:44:30.000000000 +0200 +*************** +*** 729,730 **** +--- 729,732 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 9, + /**/ + +-- +I have a watch cat! Just break in and she'll watch. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- cgit v1.2.3