]> git.eshelyaron.com Git - emacs.git/commitdiff
* src/font.c (Ffont_xlfd_name): Don't use strcpy for overlapping strings.
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Sat, 22 Jun 2019 02:37:25 +0000 (11:37 +0900)
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Sat, 22 Jun 2019 02:37:25 +0000 (11:37 +0900)
src/font.c

index 992f9e03fea464cf650862f9962ebe0019cae107..409ffa6ae0cfa747081db1240b79b839e44590da 100644 (file)
@@ -4360,7 +4360,7 @@ the consecutive wildcards are folded into one.  */)
 
       while ((p1 = strstr (p0, "-*-*")))
        {
-         strcpy (p1, p1 + 2);
+         memmove (p1, p1 + 2, (name + namelen + 1) - (p1 + 2));
          namelen -= 2;
          p0 = p1;
        }