prevent can from parsing partial frames

This commit is contained in:
smayzy 2026-04-27 14:39:05 +02:00
parent 4dbf6d4d3d
commit d44ecffb41

View File

@ -120,6 +120,8 @@ void read_can(Tel *t, int soc) {
if (nbytes < 0) return; // -1 EAGAIN means empty
if (nbytes != sizeof(struct can_frame)) return;
if (nbytes > 0) {
switch (frame.can_id) {