On Fri, Oct 22, 2010 at 10:29:26AM +0200, Marc Kleine-Budde wrote:
> Moin,
> 
> On 10/22/2010 10:11 AM, Kurt Van Dijck wrote:
> > can_dlc is minimum 4bits, but the struct can_frame is only 8 bytes.
> > Is this safe?
> > Would memcpy(msg->data, REGS, MINIMUM(8, msg->can_dlc)) be better/safe?
> 
> You're absolutely right, but... :)
> I checked that all drivers are now using get_can_dlc() [1], which
> already does the limiting.
You're so right!

Kurt
_______________________________________________
Socketcan-core mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-core

Reply via email to