Improved error message

This commit is contained in:
Florian Pose
2026-07-14 17:21:09 +02:00
parent 6cdb21c6f7
commit ec04cf746c
+7
View File
@@ -806,6 +806,13 @@ void ec_fsm_foe_state_data_read(
return;
}
if (rec_size < EC_FOE_HEADER_SIZE) {
EC_SLAVE_ERR(slave, "Received corrupted FoE size (%zu bytes)!\n",
rec_size);
ec_foe_set_rx_error(fsm, FOE_PROT_ERROR);
return;
}
rec_size -= EC_FOE_HEADER_SIZE;
if (fsm->rx_buffer_size >= fsm->rx_buffer_offset + rec_size) {