about summary refs log tree commit diff
path: root/Src/hist.c
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2013-09-26 21:24:58 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2013-09-26 21:24:58 -0700
commit98b0828c63a5e77ad313896029c854b0c3721cc9 (patch)
tree07adb7e07367e776337a06ecd8084c1eeb62aa3a /Src/hist.c
parent0ed3c5ccd0caef397eae0cce9529cda65bf31be5 (diff)
downloadzsh-98b0828c63a5e77ad313896029c854b0c3721cc9.tar.gz
zsh-98b0828c63a5e77ad313896029c854b0c3721cc9.tar.xz
zsh-98b0828c63a5e77ad313896029c854b0c3721cc9.zip
31770: memmove() instead of memcpy() for overlapping regions.
Diffstat (limited to 'Src/hist.c')
-rw-r--r--Src/hist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/hist.c b/Src/hist.c
index f78c97d8f..3d6068e51 100644
--- a/Src/hist.c
+++ b/Src/hist.c
@@ -953,7 +953,7 @@ histreduceblanks(void)
 	len = chwords[i+1] - chwords[i];
 	needblank = (i < chwordpos-2 && chwords[i+2] > chwords[i+1]);
 	if (pos != chwords[i]) {
-	    memcpy(chline + pos, chline + chwords[i], len + needblank);
+	    memmove(chline + pos, chline + chwords[i], len + needblank);
 	    chwords[i] = pos;
 	    chwords[i+1] = chwords[i] + len;
 	}