Fix test of range of skip= argument in NSH dd command. From Ken Petit
This commit is contained in:
parent
6a5d2a359c
commit
16f8dea77e
@ -529,3 +529,6 @@
|
|||||||
* apps/examples/ostest: In the non-cancelable thread test, we need
|
* apps/examples/ostest: In the non-cancelable thread test, we need
|
||||||
to give the thread an opportunity to run and to set the non-
|
to give the thread an opportunity to run and to set the non-
|
||||||
cancelable state.
|
cancelable state.
|
||||||
|
* apps/nshlib/nsh_ddcmd.c: Correct the test of the skip input
|
||||||
|
parameter. Was limiting the range to <= count. From Ken
|
||||||
|
Petit (2014-4-24).
|
||||||
|
@ -545,12 +545,6 @@ int cmd_dd(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (dd.skip > dd.nsectors)
|
|
||||||
{
|
|
||||||
nsh_output(vtbl, g_fmtarginvalid, g_dd);
|
|
||||||
goto errout_with_paths;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Allocate the I/O buffer */
|
/* Allocate the I/O buffer */
|
||||||
|
|
||||||
dd.buffer = malloc(dd.sectsize);
|
dd.buffer = malloc(dd.sectsize);
|
||||||
|
Loading…
Reference in New Issue
Block a user