]> granicus.if.org Git - vim/commitdiff
patch 8.1.0176: overlapping string argument for strcpy() v8.1.0176
authorBram Moolenaar <Bram@vim.org>
Tue, 10 Jul 2018 15:33:45 +0000 (17:33 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 10 Jul 2018 15:33:45 +0000 (17:33 +0200)
Problem:    Overlapping string argument for strcpy(). (Coverity)
Solution:   Use STRMOVE() instead of STRCPY(). (Dominique Pelle, closes #3187)

src/term.c
src/version.c

index 21f9a3cfa70ce2ad401b21ddf74d1b1bfdaad3e2..209a03f5c1a8a298b33102dac89c080026f25036 100644 (file)
@@ -1483,7 +1483,7 @@ parse_builtin_tcap(char_u *term)
                            if (term_7to8bit(t))
                            {
                                *t = term_7to8bit(t);
-                               STRCPY(t + 1, t + 2);
+                               STRMOVE(t + 1, t + 2);
                            }
                        term_strings[p->bt_entry] = s;
                        set_term_option_alloced(&term_strings[p->bt_entry]);
index 58751e3215ebaf2bb0c5cff24e613080ca18aedc..982d1118787ab81b1e1aac88975d42abcd60c0d5 100644 (file)
@@ -789,6 +789,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    176,
 /**/
     175,
 /**/