Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/nvi/dist/ex Fix backward memcpy in :e +cmd, tak...



details:   https://anonhg.NetBSD.org/src/rev/d5ef3ecf7515
branches:  trunk
changeset: 357711:d5ef3ecf7515
user:      rin <rin%NetBSD.org@localhost>
date:      Wed Nov 22 13:13:18 2017 +0000

description:
Fix backward memcpy in :e +cmd, taken from nvi2 (and OpenBSD):
https://github.com/lichray/nvi2/commit/7ab02500a2d89bc45db383cb3dcd10f3c4301a8c
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/vi/ex/ex.c#rev1.21

diffstat:

 external/bsd/nvi/dist/ex/ex.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 9b5609848c66 -r d5ef3ecf7515 external/bsd/nvi/dist/ex/ex.c
--- a/external/bsd/nvi/dist/ex/ex.c     Wed Nov 22 12:47:30 2017 +0000
+++ b/external/bsd/nvi/dist/ex/ex.c     Wed Nov 22 13:13:18 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ex.c,v 1.6 2017/11/13 01:40:37 rin Exp $ */
+/*     $NetBSD: ex.c,v 1.7 2017/11/22 13:13:18 rin Exp $ */
 /*-
  * Copyright (c) 1992, 1993, 1994
  *     The Regents of the University of California.  All rights reserved.
@@ -16,7 +16,7 @@
 static const char sccsid[] = "Id: ex.c,v 10.75 2004/03/16 14:13:35 skimo Exp  (Berkeley) Date: 2004/03/16 14:13:35 ";
 #endif /* not lint */
 #else
-__RCSID("$NetBSD: ex.c,v 1.6 2017/11/13 01:40:37 rin Exp $");
+__RCSID("$NetBSD: ex.c,v 1.7 2017/11/22 13:13:18 rin Exp $");
 #endif
 
 #include <sys/types.h>
@@ -1512,7 +1512,7 @@
 
                ecp->save_cmd -= arg1_len;
                ecp->save_cmdlen += arg1_len;
-               MEMCPYW(ecp->save_cmd, arg1, arg1_len);
+               MEMMOVEW(ecp->save_cmd, arg1, arg1_len);
 
                /*
                 * Any commands executed from a +cmd are executed starting at



Home | Main Index | Thread Index | Old Index