Increase buffer size to prevent potential overflow
This commit is contained in:
parent
34168759b0
commit
dcf771424b
|
@ -364,7 +364,7 @@ static int cmd_write(PROGRAMMER * pgm, struct avrpart * p,
|
|||
return -1;
|
||||
}
|
||||
|
||||
uint8_t * buf = malloc(mem->size);
|
||||
uint8_t * buf = malloc(mem->size + 0x10);
|
||||
if (buf == NULL) {
|
||||
avrdude_message(MSG_INFO, "%s (write): out of memory\n", progname);
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue