Re: [PATCH 2/5 v4] accel/qaic: tighten bounds checking in decode_message()

2023-07-14 Thread Jeffrey Hugo
On 7/14/2023 5:42 AM, Pranjal Ramajor Asha Kanojiya wrote: On 7/11/2023 1:50 PM, Dan Carpenter wrote: Copy the bounds checking from encode_message() to decode_message(). This patch addresses the following concerns.  Ensure that there is enough space for at least one header so that we don't ha

Re: [PATCH 2/5 v4] accel/qaic: tighten bounds checking in decode_message()

2023-07-14 Thread Pranjal Ramajor Asha Kanojiya
On 7/11/2023 1:50 PM, Dan Carpenter wrote: Copy the bounds checking from encode_message() to decode_message(). This patch addresses the following concerns. Ensure that there is enough space for at least one header so that we don't have a negative size later. if (msg_hdr_len < sizeof

[PATCH 2/5 v4] accel/qaic: tighten bounds checking in decode_message()

2023-07-11 Thread Dan Carpenter
Copy the bounds checking from encode_message() to decode_message(). This patch addresses the following concerns. Ensure that there is enough space for at least one header so that we don't have a negative size later. if (msg_hdr_len < sizeof(*trans_hdr)) Ensure that we have enough space