Merge pull request #121 from olerem/size

testj1939: fail if we use unsupported size
pull/129/head
Marc Kleine-Budde 2019-01-14 10:03:34 +01:00 committed by GitHub
commit 7b70a433cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -101,6 +101,8 @@ int main(int argc, char *argv[])
break;
case 's':
todo_send = strtoul(optarg ?: "8", NULL, 0);
if (todo_send > sizeof(dat))
error(1, 0, "Unsupported size. max: %i", sizeof(dat));
break;
case 'r':
todo_recv = 1;