use_resolved = 1;
break;
case 's':
- stack = atoi(optarg);
+ if (sscanf(optarg, "%i", &stack) != 1) {
+ fprintf(stderr, "%s invalid stack size %s\n", argv[0], optarg);
+ usage();
+ }
break;
case 'R':
rel_file = optarg;
case 'R': ramload = -1; break;
case 'k': ktrace = 1; break;
case 'K': ktrace = -1; break;
- case 's': stacksize = atoi(optarg); break;
case 'o': ofile = optarg; break;
+ case 's':
+ if (sscanf(optarg, "%i", &stacksize) != 1)
+ usage("invalid stack size");
+ break;
default:
usage("invalid option");
break;