willys5000 / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

Crypt method blowfish corrupts large files in 7.4. Okay in 7.3. #369

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a large file (e.g. 2 MB file).  You can use the num.txt.gz attachment 
but gunzip it first.

2. Use vim to load num.txt and configure these settings.
set cm=blowfish
set key=num
w num2.txt

3. Use vim to load num2.txt.  Enter "num" for the password.  Go to the end of 
the file.  The file is corrupted.

What is the expected output? What do you see instead?
It should show the original file contents.

What version of the product are you using? On what operating system?
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug 10 2013 14:33:40)

This was on a Windows 8.1 machine, but it happens on Mac and Linux as well.
Vim 7.3.46 does not have this problem.  Using crypt method zip does not have 
this problem.

Original issue reported on code.google.com by stlee...@gmail.com on 28 May 2015 at 3:59

Attachments:

GoogleCodeExporter commented 9 years ago
It sounds like you're using the installer from vim.org, which is severely 
outdated.  Testing with the latest code in Mercurial, I don't see your problem.

I'd suggest using the installers the Cream project makes available 
(http://sourceforge.net/projects/cream/files/Vim), since it seems this has 
already been fixed.

Original comment by vega.james@gmail.com on 28 May 2015 at 4:21

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Actually we've seen problems encrypting large files at least as late as   
7.4.608: https://groups.google.com/d/topic/vim_use/NFvXEopHBOI/discussion 

I don't think those problems were ever tracked down and fixed. 

Perhaps this problem is similar. However, I cannot reproduce it with the   
attached test file, using either blowfish2 or blowfish methods in 7.4.682.   
If you're still able to reproduce, try disabling swap files before   
encrypting. That's what worked as a workaround in the linked thread.

Original comment by benjamin...@rockwellcollins.com on 28 May 2015 at 5:43

GoogleCodeExporter commented 9 years ago
I can reproduce it with a plain 7.4 Windows built. I don't know the crypt code 
very well, but I'll see if I can find the problem.

Original comment by chrisbr...@googlemail.com on 28 May 2015 at 7:23

GoogleCodeExporter commented 9 years ago
I downloaded and installed gvim-7-4-711.exe and while the problem doesn't 
happen exactly as I state now, the corruption is still there.  Just page down 
to the second or third page and there is "garbage" in the middle of the file 
instead of the end of the file.

One other thing I noticed now is that even with the zip encryption, corruption 
occurred in the middle of the file.

Vim 7.3 does not have this problem so it seems like a regression.  Also using 
blowfish takes much longer to encrypt and decrypt compared to Vim 7.3.

Original comment by stlee...@gmail.com on 28 May 2015 at 7:35

GoogleCodeExporter commented 9 years ago
Did you try disabling swap files?

Original comment by fritzoph...@gmail.com on 28 May 2015 at 10:04