Skip to content

Commit

Permalink
Fix backwards memcpy in :e +cmd (OpenBSD.51).
Browse files Browse the repository at this point in the history
  • Loading branch information
lichray committed Apr 27, 2017
1 parent 328d2f5 commit 7ab0250
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ex/ex.c
Expand Up @@ -10,7 +10,7 @@
#include "config.h"

#ifndef lint
static const char sccsid[] = "$Id: ex.c,v 10.81 2015/12/29 11:30:58 zy Exp $";
static const char sccsid[] = "$Id: ex.c,v 10.82 2017/04/27 14:01:59 zy Exp $";
#endif /* not lint */

#include <sys/types.h>
Expand Down Expand Up @@ -1503,7 +1503,7 @@ usage: msgq(sp, M_ERR, "086|Usage: %s", ecp->cmd->usage);

ecp->save_cmd -= arg1_len;
ecp->save_cmdlen += arg1_len;
MEMCPY(ecp->save_cmd, arg1, arg1_len);
MEMMOVE(ecp->save_cmd, arg1, arg1_len);

/*
* Any commands executed from a +cmd are executed starting at
Expand Down

0 comments on commit 7ab0250

Please sign in to comment.