| To: vim_dev@googlegroups.com |
| Subject: Patch 7.4.714 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 7.4.714 |
| Problem: Illegal memory access when there are illegal bytes. |
| Solution: Check the byte length of the character. (Dominique Pelle) |
| Files: src/regexp.c |
| |
| |
| |
| |
| |
| *** 6113,6119 **** |
| { |
| if (ireg_ic && enc_utf8) |
| cf = utf_fold(utf_ptr2char(opnd)); |
| ! while (count < maxcount) |
| { |
| for (i = 0; i < len; ++i) |
| if (opnd[i] != scan[i]) |
| --- 6113,6119 ---- |
| { |
| if (ireg_ic && enc_utf8) |
| cf = utf_fold(utf_ptr2char(opnd)); |
| ! while (count < maxcount && (*mb_ptr2len)(scan) >= len) |
| { |
| for (i = 0; i < len; ++i) |
| if (opnd[i] != scan[i]) |
| |
| |
| |
| *** 743,744 **** |
| --- 743,746 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 714, |
| /**/ |
| |
| -- |
| hundred-and-one symptoms of being an internet addict: |
| 26. You check your mail. It says "no new messages." So you check it again. |
| |
| /// 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 /// |