Christian Brabandt wrote:
> > Hi Bram!
> >
> > On Do, 22 Sep 2016, Bram Moolenaar wrote:
> >
> > >
> > > Christian Brabandt wrote:
> > >
> > > > This patch fixes it.
> > > > ```patch
> > > > diff --git a/src/fileio.c b/src/fileio.c
> > > > index ea1f338..193e4fd 100644
> > > > --- a/src/fileio.c
> > > > +++ b/src/fileio.c
> > > > @@ -3011,6 +3011,9 @@ check_for_cryptkey(
> > > >
> > > > /* Remove cryptmethod specific header from the text. */
> > > > header_len = crypt_get_header_len(method);
> > > > + if (*sizep <= header_len)
> > > > + /* buffer can't be encrypted */
> > > > + return NULL;
> > > > *filesizep += header_len;
> > > > *sizep -= header_len;
> > > > mch_memmove(ptr, ptr + header_len, (size_t)*sizep);
> > > > ```
> > >
> > > Thanks. Would be good to have a test. Should be possible by writing an
> > > encrypted file and then opening it in binary mode.
> >
> > Updated patch attached.
>
> Sorry, the patch did not survive github. This time really attached to
> the vim-dev list.
I had just sent out a patch with a similar test. It was based on the
original problem description. Sorry for being impatient!
--
FATHER: Who are you?
PRINCE: I'm ... your son ...
FATHER: Not you.
LAUNCELOT: I'm ... er ... Sir Launcelot, sir.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [email protected] -- 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 ///
--
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.