From dcf771424b0e84f216e08479d09db0001586b079 Mon Sep 17 00:00:00 2001 From: MCUdude Date: Fri, 18 Mar 2022 19:17:17 +0100 Subject: [PATCH] Increase buffer size to prevent potential overflow --- src/term.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/term.c b/src/term.c index ba0cf5cf..991ff92d 100644 --- a/src/term.c +++ b/src/term.c @@ -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;