bugAVR Downloader/UploaDEr - Bugs: bug #39691, Buffer overrun when reading EEPROM...


You are not allowed to post comments on this tracker with your current authentification level.

bug #39691: Buffer overrun when reading EEPROM byte with JTAGICE3

Submitted by:  David Glaze <djglaze>
Submitted on:  Sun 04 Aug 2013 04:52:14 PM UTC  
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedPrivacy: Public
Assigned to: Joerg Wunsch <joerg_wunsch>Originator Name: David Glaze
Open/Closed: Closed

Tue 03 Sep 2013 12:00:01 PM UTC, comment #1:

Fixed in SVN r1202.

The problem turned out that (PGM)->eeprom_pagesize was never
set to the actual page size, so the page cache being allocated
was not usable by anything except free().

I kept the caching inside jtag3_read_byte() as I think it's
still useful to have.

Joerg Wunsch <joerg_wunsch>
Project AdministratorIn charge of this item.
Sun 04 Aug 2013 04:52:14 PM UTC, original submission:

Avrdude has a bug that causes it to write outside a buffer when attempting to use the erase-rewrite cycle counter feature (-y) with the JTAGICE3 programmer on an ATxmega128A3U part. The resulting error is:

The problem has been tracked down to the jtag3_read_byte() routine in jtag3.c, in the code snippit:

I believe this should instead be:

so that when doing a byte read (MTYPE_EEPROM), the pagesize variable remains unset and won't trigger the page buffering routines below.

This fix appears to work correctly for me, although it then reveals other downwind issues (which have been submitted in another ticket).

David Glaze <djglaze>


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by joerg_wunsch (Posted a comment)
  • -unavailable- added by djglaze (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 03 Sep 2013 12:00:01 PM UTCjoerg_wunschStatusNone=>Fixed
      Assigned toNone=>joerg_wunsch

    Back to the top

    Powered by Savane 3.1-cleanup