diff --git a/jtag/ChangeLog b/jtag/ChangeLog index 8a61f8a8..def7dc8a 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,3 +1,8 @@ +2008-10-13 Jie Zhang + + * src/tap/cable/ft2232.c (ft2232_transfer_schedule): Don't + access memory out of bounds. + 2008-10-11 Arnim Laeuger * src/bus/ejtag.c (ejtag_bus_init): added remaining return values diff --git a/jtag/src/tap/cable/ft2232.c b/jtag/src/tap/cable/ft2232.c index 01b2b553..78866cc1 100644 --- a/jtag/src/tap/cable/ft2232.c +++ b/jtag/src/tap/cable/ft2232.c @@ -1052,7 +1052,7 @@ ft2232_transfer_schedule( cable_t *cable, int len, char *in, char *out ) { int bit_idx; unsigned char b = 0; - for (bit_idx = 1; bit_idx <= 1 << bitwise_len; bit_idx <<= 1) + for (bit_idx = 1; bit_idx < 1 << bitwise_len; bit_idx <<= 1) { if (in[in_offset++]) b |= bit_idx;