Skip to content

Commit

Permalink
buffer overrun fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
jfdelnero committed Nov 14, 2023
1 parent 6667ace commit 63a8153
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib_jtag_core/src/jtag_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ int jtagcore_scan_and_init_chain(jtag_core * jc)
jc->io_functions.drv_TXRX_DATA(jc, (unsigned char *)&buf_out, (unsigned char *)&buf_in, sizeof(buf_out));

i = 0;
while (!buf_in[i] && i < sizeof(buf_out))
while( i < sizeof(buf_in) && !buf_in[i])
{
i++;
}
Expand Down

0 comments on commit 63a8153

Please sign in to comment.