Diff between c389209ce4554fd8fdd3ca99ea6f73435a056c57 and 8e495f00cded86496ad5c32e7a3cf902a8bdbe82
Changed Files
| File | Additions | Deletions | Status |
| tools/rctest.c | +4 | -1 | modified |
Full Patch
diff --git a/tools/rctest.c b/tools/rctest.c
index e39d313..b72be91 100644
--- a/tools/rctest.c
+++ b/tools/rctest.c
@@ -41,6 +41,8 @@
#define SIOCGSTAMP_OLD SIOCGSTAMP
#endif
+#define MAX_DATA_SIZE 0x40000000
+
/* Test modes */
enum {
SEND,
@@ -749,7 +751,8 @@ int main(int argc, char *argv[])
break;
case 'b':
- data_size = atoi(optarg);
+ if (optarg && atoi(optarg) < MAX_DATA_SIZE)
+ data_size = atoi(optarg);
break;
case 'i':