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 f7bb8a1c2a
commit a1933951b4
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2014-02-28 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
* jtag3.c (jtag3_recv): avoid memmov'ing more data than available
2014-02-27 Joerg Wunsch <j.gnu@uriah.heep.sax.de> 2014-02-27 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
* avrdude.1: Documentation update for EDBG. * avrdude.1: Documentation update for EDBG.

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 * the job easier for the caller. We have to return the
* original pointer though, as the caller must free() it. * original pointer though, as the caller must free() it.
*/ */
memmove(*msg, *msg + 3, rv);
rv -= 3; rv -= 3;
memmove(*msg, *msg + 3, rv);
return rv; return rv;
} }