| To: vim-dev@vim.org |
| Subject: patch 7.1.037 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 7.1.037 |
| Problem: strcpy() used for overlapping strings. (Chris Monson) |
| Solution: Use mch_memmove() instead. |
| Files: src/option.c |
| |
| |
| |
| |
| |
| *** 4628,4634 **** |
| if ((!(flags & P_COMMA) || *s != ',') |
| && vim_strchr(s + 1, *s) != NULL) |
| { |
| ! STRCPY(s, s + 1); |
| --s; |
| } |
| } |
| --- 4628,4634 ---- |
| if ((!(flags & P_COMMA) || *s != ',') |
| && vim_strchr(s + 1, *s) != NULL) |
| { |
| ! mch_memmove(s, s + 1, STRLEN(s)); |
| --s; |
| } |
| } |
| |
| |
| |
| *** 668,669 **** |
| --- 668,671 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 37, |
| /**/ |
| |
| -- |
| This planet has -- or rather had -- a problem, which was this: most |
| of the people living on it were unhappy for pretty much of the time. |
| Many solutions were suggested for this problem, but most of these |
| were largely concerned with the movements of small green pieces of |
| paper, which is odd because on the whole it wasn't the small green |
| pieces of paper that were unhappy. |
| -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" |
| |
| /// Bram Moolenaar -- Bram@Moolenaar.net -- 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 /// |