Skip to content

Commit

Permalink
unit-test: Fix pxEthernetBuffer[-ipIP_TYPE_OFFSET] buffer underflows
Browse files Browse the repository at this point in the history
The tested functions intentionally expect there to be bytes before
the ethernet buffer:

* test_FreeRTOS_GetUDPPayloadBuffer_*():
  The code under test, FreeRTOS_GetUDPPayloadBuffer_Multi,
  writes 6 bytes before the ethernet buffer. This looks
  intentional, as the write is commented as doing that.
* FreeRTOS_IP_utest:
  The code under test, prvProcessIPPacket() intentionally
  writes a byte at offset -ipIP_TYPE_OFFSET into its
  ethernet buffer.

I am thankful for the generous comment about the ipIP_TYPE_OFFSET.
  • Loading branch information
anordal committed Jun 4, 2024
1 parent 034800e commit 8b9b6f7
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 95 deletions.
Loading

0 comments on commit 8b9b6f7

Please sign in to comment.