From 36ec763dbd4e30b614f491482b77fd4e0507fe85 Mon Sep 17 00:00:00 2001 From: "Barton E. Schaefer" Date: Mon, 15 Dec 2014 16:41:08 -0800 Subject: 33976: fix overlapping strcpy() --- ChangeLog | 4 ++++ Src/subst.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 17d56a742..a53321e51 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-12-15 Barton E. Schaefer + + * 33976: Src/subst.c: fix overlapping strcpy() + 2014-12-14 Mikael Magnusson * users/19530: Completion/Unix/Type/_file_systems: Handle diff --git a/Src/subst.c b/Src/subst.c index 43932c256..4100803e7 100644 --- a/Src/subst.c +++ b/Src/subst.c @@ -298,7 +298,7 @@ stringsubst(LinkList list, LinkNode node, int pf_flags, int asssub) if (endchar == Outpar) str2--; if (!(s = (char *) ugetnode(pl))) { - str = strcpy(str2, str); + str = (char *)memmove(str2, str, strlen(str)+1); continue; } if (!qt && (pf_flags & PREFORK_SINGLE) && isset(GLOBSUBST)) -- cgit 1.4.1