mod/transport: Perform null check before dereferencing 'buffer' pointer
In the function transport_transmit, dereferencing of the 'buffer' pointer
to access member variables was occurring before the check to ensure
the pointer was not null. There was also a missing bounds check to
ensure'size' was not greater than max_payload_size.
In the function transport_respond a call is made to fwk_str_memcpy
passing the 'buffer' pointer as a parameter was made before the check
to ensure the pointer was not null. There was also a missing bounds check
to ensure'size' was not greater than max_payload_size.
This did not cause an issue as there is no code path that leads to these
functions being called with ‘buffer’ set to null.
Signed-off-by:
Matthew Wellings <matthew.wellings@arm.com>
Loading
Please register or sign in to comment