Dominique Pelle wrote:

> On Nov 23, 2007 12:14 AM, Dominique Pelle <[EMAIL PROTECTED]> wrote:
> 
> > Valgrind memory checker detects out of bounds memory access
> > when using random characters in regular expressions.
> [...snip...]
> > I attach a patch which fixes it.  Perhaps there is a better way of
> > fixing it.
> 
> 
> Hmmm, re-thinking about it, perhaps it's simpler and better to just
> make vim_regcomp(expr, re_flags) check whether input regex
> string (expr) is a valid utf-8 string before compiling it, and if not,
> display an error message to user (something like "Regular expression
> is not a valid utf-8 string") and return NULL immediately, rather than
> trying to work around invalid utf-8 patterns.  I can't think of any good
> reason for searching with a pattern containing invalid utf-8 strings
> anyway (when using utf8 encoding)
> 
> Something like this?

Well, if someone manages to enter an invalid utf-8 character it's
difficult to guess why this would happen.  We might as well search for
it.

-- 
hundred-and-one symptoms of being an internet addict:
140. You'd rather catch a score on the web than watch the game as
     it is being played on tv.

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui