Per Mike Frysinger's suggestion, we check for strtoll() and strtoull()
errors by using the "common.h" helper functions simple_strtoll() and
simple_strtoull().
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
omitbad = true;
break;
case 's':
- start_addr = strtoull(optarg, NULL, 0);
+ start_addr = simple_strtoull(optarg, &error);
break;
case 'f':
if (!(dumpfile = strdup(optarg))) {
}
break;
case 'l':
- length = strtoull(optarg, NULL, 0);
+ length = simple_strtoull(optarg, &error);
break;
case 'o':
omitoob = true;
writeoob = true;
break;
case 's':
- mtdoffset = strtoll(optarg, NULL, 0);
+ mtdoffset = simple_strtoll(optarg, &error);
break;
case 'b':
blockalign = atoi(optarg);