diff --git a/ChangeLog b/ChangeLog index 035aac29..fadf932d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-05-16 Joerg Wunsch + + * avr.c (avr_read, avr_write): only use the paged_load and + paged_write backend functions iff the memory area in question has + a page_size != 0. + This is supposed to fix bug #19234: avrdude-5.3.1 segfaults when + stk500v1 tries to program an ATtiny15 + 2007-05-15 Joerg Wunsch * avr910.c: Fall back to avr_{read,write}_byte_default(). Fixes diff --git a/avr.c b/avr.c index b0d24133..45ed124c 100644 --- a/avr.c +++ b/avr.c @@ -172,7 +172,7 @@ int avr_read(PROGRAMMER * pgm, AVRPART * p, char * memtype, int size, memset(buf, 0xff, size); if ((strcmp(mem->desc, "flash")==0) || (strcmp(mem->desc, "eeprom")==0)) { - if (pgm->paged_load != NULL) { + if (pgm->paged_load != NULL && mem->page_size != 0) { /* * the programmer supports a paged mode read, perhaps more * efficiently than we can read it directly, so use its routine @@ -569,7 +569,7 @@ int avr_write(PROGRAMMER * pgm, AVRPART * p, char * memtype, int size, } if ((strcmp(m->desc, "flash")==0) || (strcmp(m->desc, "eeprom")==0)) { - if (pgm->paged_write != NULL) { + if (pgm->paged_write != NULL && m->page_size != 0) { /* * the programmer supports a paged mode write, perhaps more * efficiently than we can read it directly, so use its routine