diff --git a/ChangeLog b/ChangeLog index dd17bdf3..af7f399b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-02-28 Joerg Wunsch + + * jtag3.c (jtag3_recv): avoid memmov'ing more data than available + 2014-02-27 Joerg Wunsch * avrdude.1: Documentation update for EDBG. diff --git a/jtag3.c b/jtag3.c index fa092572..f388dfa9 100644 --- a/jtag3.c +++ b/jtag3.c @@ -758,8 +758,8 @@ int jtag3_recv(PROGRAMMER * pgm, unsigned char **msg) { * the job easier for the caller. We have to return the * original pointer though, as the caller must free() it. */ - memmove(*msg, *msg + 3, rv); rv -= 3; + memmove(*msg, *msg + 3, rv); return rv; }