Message ID | 20240704180752.94264-4-r.smirnov@omp.ru |
---|---|
State | New |
Headers | show |
Series | fix errors found by SVACE static analyzer #2 | expand |
diff --git a/tools/isotest.c b/tools/isotest.c index c1bb6abd2..2cac0e49c 100644 --- a/tools/isotest.c +++ b/tools/isotest.c @@ -51,6 +51,8 @@ #define DEFAULT_BIG_ID 0x01 #define DEFAULT_BIS_ID 0x01 +#define MAX_DATA_SIZE 0x40000000 + /* Test modes */ enum { SEND, @@ -1253,7 +1255,7 @@ int main(int argc, char *argv[]) break; case 'b': - if (optarg) + if (optarg && atoi(optarg) < MAX_DATA_SIZE) data_size = atoi(optarg); break;