mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-12-16 18:44:17 +00:00
Fix a serious memory corruption that happened when using the JTAG ICE
mkII (or AVR Dragon) in ISP mode. The wrong set of per-programmer private data had been allocated (stk500v2 vs. jtagmkII) which was too small to hold the actual data. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@781 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
@@ -130,7 +130,7 @@ static int jtagmkII_setparm(PROGRAMMER * pgm, unsigned char parm,
|
||||
unsigned char * value);
|
||||
static void jtagmkII_print_parms1(PROGRAMMER * pgm, const char * p);
|
||||
|
||||
static void jtagmkII_setup(PROGRAMMER * pgm)
|
||||
void jtagmkII_setup(PROGRAMMER * pgm)
|
||||
{
|
||||
if ((pgm->cookie = malloc(sizeof(struct pdata))) == 0) {
|
||||
fprintf(stderr,
|
||||
@@ -141,7 +141,7 @@ static void jtagmkII_setup(PROGRAMMER * pgm)
|
||||
memset(pgm->cookie, 0, sizeof(struct pdata));
|
||||
}
|
||||
|
||||
static void jtagmkII_teardown(PROGRAMMER * pgm)
|
||||
void jtagmkII_teardown(PROGRAMMER * pgm)
|
||||
{
|
||||
free(pgm->cookie);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user