projects
/
platform
/
upstream
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
nandwrite: complain on malformed -s NUM
[platform/upstream/busybox.git]
/
miscutils
/
nandwrite.c
diff --git
a/miscutils/nandwrite.c
b/miscutils/nandwrite.c
index
d0e4397
..
8df0fdc
100644
(file)
--- a/
miscutils/nandwrite.c
+++ b/
miscutils/nandwrite.c
@@
-72,6
+72,8
@@
int nandwrite_main(int argc UNUSED_PARAM, char **argv)
xioctl(fd, MEMGETINFO, &meminfo);
mtdoffset = bb_strtou(opt_s, NULL, 0);
+ if (errno)
+ bb_error_msg_and_die("invalid number '%s'", opt_s);
/* Pull it into a CPU register (hopefully) - smaller code that way */
meminfo_writesize = meminfo.writesize;