mirror of
https://github.com/linux-can/can-utils.git
synced 2026-08-05 06:20:00 +02:00
Merge pull request #121 from olerem/size
testj1939: fail if we use unsupported size
This commit is contained in:
@@ -101,6 +101,8 @@ int main(int argc, char *argv[])
|
|||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
todo_send = strtoul(optarg ?: "8", NULL, 0);
|
todo_send = strtoul(optarg ?: "8", NULL, 0);
|
||||||
|
if (todo_send > sizeof(dat))
|
||||||
|
error(1, 0, "Unsupported size. max: %i", sizeof(dat));
|
||||||
break;
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
todo_recv = 1;
|
todo_recv = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user