mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-24 23:42:05 +08:00
Extra check for tail_size length (#23047)
This commit is contained in:
@@ -478,6 +478,7 @@ bool Panda::unpack_can_buffer(uint8_t *data, int size, std::vector<can_frame> &o
|
||||
} else {
|
||||
// Keep partial CAN packet until next USB packet
|
||||
tail_size = (chunk_len - pos);
|
||||
assert(tail_size <= CANPACKET_MAX_SIZE);
|
||||
memcpy(tail, &chunk[pos], tail_size);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user