Fix a signedness bug when shifting bits; this caused the length field

of the packet to occasionally been misinterpreted as a negative
number.

When discarding a packet for being overly long, restart the state
machine instead of attempting to drop a preposterous amount of data.
It is unlikely in that case that preposterous amount of data would
ever arrive, so rather attempt to re-align the reading algorithm
(supposedly resulting in a timeout and retransmit).


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@472 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
joerg_wunsch
2005-05-27 12:15:28 +00:00
parent 3b22cb93c0
commit 09d754b9fd
2 changed files with 15 additions and 7 deletions

View File

@@ -1,3 +1,10 @@
2005-05-27 Joerg Wunsch <j@uriah.heep.sax.de>
* jtagmkII.c: fix a signedness bug when shifting bits; when
discarding a packet for being overly long, restart the state
machine instead of attempting to drop a preposterous amount
of data.
2005-05-19 Joerg Wunsch <j@uriah.heep.sax.de>
* avrdude.1: