Increase buffer size to prevent potential overflow

This commit is contained in:
MCUdude
2022-03-18 19:17:17 +01:00
parent 34168759b0
commit dcf771424b

View File

@@ -364,7 +364,7 @@ static int cmd_write(PROGRAMMER * pgm, struct avrpart * p,
return -1; return -1;
} }
uint8_t * buf = malloc(mem->size); uint8_t * buf = malloc(mem->size + 0x10);
if (buf == NULL) { if (buf == NULL) {
avrdude_message(MSG_INFO, "%s (write): out of memory\n", progname); avrdude_message(MSG_INFO, "%s (write): out of memory\n", progname);
return -1; return -1;