In jtag3_recv, avoid memmov'ing more data than available

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1286 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
joerg_wunsch
2014-02-28 14:24:48 +00:00
parent 0fe50d77de
commit 8dcc336e04
2 changed files with 5 additions and 1 deletions

View File

@@ -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;
}