From 3ff232b966c8609ab514e9c2a2bcf8df136e9d6c Mon Sep 17 00:00:00 2001 From: Rene Liebscher Date: Mon, 6 Feb 2012 19:41:36 +0000 Subject: [PATCH] patch #7720 Bug in EEPROM write * avrftdi.c: fixed wrong buffer address initialization in paged_write * fileio.c: added #include git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1067 81a1dc3b-b13d-400b-aceb-764788c761c2 --- avrdude/ChangeLog | 7 +++++++ avrdude/avrftdi.c | 2 +- avrdude/fileio.c | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/avrdude/ChangeLog b/avrdude/ChangeLog index 3bdd50c5..d2d68020 100644 --- a/avrdude/ChangeLog +++ b/avrdude/ChangeLog @@ -1,3 +1,10 @@ +2012-02-06 Rene Liebscher + + patch #7720 Bug in EEPROM write + * avrftdi.c: fixed wrong buffer address initialization in paged_write + + * fileio.c: added #include + 2012-02-05 Rene Liebscher bug #30559 Ft232 bit-bang support diff --git a/avrdude/avrftdi.c b/avrdude/avrftdi.c index 098cb240..79cfb24b 100644 --- a/avrdude/avrftdi.c +++ b/avrdude/avrftdi.c @@ -736,7 +736,7 @@ static int avrftdi_eeprom_write(PROGRAMMER *pgm, AVRPART *p, AVRMEM *m, unsigned int page_size, unsigned int addr, unsigned int len) { unsigned char cmd[4]; - unsigned char *data = m->buf; + unsigned char *data = &m->buf[addr]; unsigned int add; avr_set_bits(m->op[AVR_OP_WRITE], cmd); diff --git a/avrdude/fileio.c b/avrdude/fileio.c index 438caaf9..7eaca337 100644 --- a/avrdude/fileio.c +++ b/avrdude/fileio.c @@ -27,6 +27,7 @@ #include #include #include +#include #ifdef HAVE_LIBELF #include