canbus: isotp: Fix NULL deref after overflow
The implementation checks if there are not enough buffers to add the received data. However, a return was missing after the error signaling. Fixes #22657 Coverity-CID: 208191 Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
This commit is contained in:
parent
b6b4396c48
commit
c9d76eef88
|
@ -432,6 +432,7 @@ static inline void receive_add_mem(struct isotp_recv_ctx *ctx, u8_t *data,
|
|||
if (!ctx->act_frag) {
|
||||
LOG_ERR("No fragmet left to append data");
|
||||
receive_report_error(ctx, ISOTP_N_BUFFER_OVERFLW);
|
||||
return;
|
||||
}
|
||||
|
||||
net_buf_add_mem(ctx->act_frag, data + tailroom, len - tailroom);
|
||||
|
|
Loading…
Reference in a new issue