summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJerzy Kasenberg <[email protected]>2022-05-01 14:18:53 +0200
committerJerzy Kasenberg <[email protected]>2022-05-01 14:26:24 +0200
commite49cad84e2798ddd4ee49d3684ce7b414d30ccb2 (patch)
tree3413f2a9faf31d126122d42eed417e91291a8f37 /docs
parentc145777e0eb6b9add414504dd8cf4ec7da6cc61a (diff)
dcd_pic32: Fix memory overwrite in incoming data
When transfer was finished rx_fifo_read() read all that was to read RXPKTRDY was cleared allowing next packet to be received. Then xfer_complete was called. Interrupt for OUT endpoint was left enable, that would not be a problem if data was handled fast and new transfer was scheduled. For MSC when host sends a lot of data this interrupt that was enabled could cause epn_handle_rx_int() to be called after transfer was completed and next was not scheduled yet. Without TU_ASSERT that was added to detect this, incoming data was written past buffer provided by user code resulting in random memory corruption. This just blocks RX interrupt when transfer is finished, and also only unmasked rx interrupts are handled.
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions