mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-16 12:55:26 +08:00
grlib/grcanfd: Mask frame data length value to prevent overflow
This commit is contained in:
committed by
Kinsey Moore
parent
0bafb10a69
commit
72c0f5ccc1
@@ -347,7 +347,7 @@ static int grcan_hw_write_try_fd(
|
||||
return GRCAN_RET_INVARG;
|
||||
break;
|
||||
}
|
||||
dest->head[1] = (dlc << 28) |
|
||||
dest->head[1] = ((dlc & 0xf) << 28) |
|
||||
((source->fdopts & GRCAN_FDMASK) << 25);
|
||||
dp = &dest->data0;
|
||||
for (i = 0; i < ((source->len + 7) / 8); i++) {
|
||||
|
||||
Reference in New Issue
Block a user