Comment #9 on issue 369 by chrisbr...@googlemail.com: Crypt method blowfish corrupts large files in 7.4. Okay in 7.3.
https://code.google.com/p/vim/issues/detail?id=369

I think, I found the problem. We are setting the key and the cryptmethod. When
writing the buffer, Vim gets each line and when getting a line, it will need
to find the block, it belongs to, which means, it will eventually call mf_get()
to read a new block from the disc. But, in mf_get() we are calling
ml_decrypt_data() to decrypt the block, if a key is set. Unfortunately, the
block isn't actually encrypted yet...

That means, it happens only, if the file does need several blocks and more than
'maxmem' kbytes.

My guess is, this happens, because on Windows 'mm' defaults to 2048, while on Linux, maxmem defaults to half of the memory available, so therefore, this bug does not trigger there, because it can read all blocks into memory when reading
the buffer and does not need to get the block from the disc again.

Unfortunately, I don't have a patch available yet.

As side note, it looks strange, that the maxmem limit on Windows is so much
smaller than on Linux. One might consider increasing this limit on Windows as
well.


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui