projects
/
paraslash.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
com_stat(): Be more anal in checking command line options.
[paraslash.git]
/
command.c
diff --git
a/command.c
b/command.c
index e3b15a5ae0e44985a6279ac2f8e137d19fb3c9be..f61ea57220d2be440728883564734e460f4c110c 100644
(file)
--- a/
command.c
+++ b/
command.c
@@
-307,8
+307,13
@@
int com_stat(int fd, int argc, char * const * argv)
para_sigaction(SIGUSR1, dummy);
- if (argc > 1)
- num = atoi(argv[1]);
+ if (argc > 2)
+ return -E_COMMAND_SYNTAX;
+ if (argc > 1) {
+ ret = para_atoi32(argv[1], &num);
+ if (ret < 0)
+ goto out;
+ }
for (;;) {
mmd_dup(nmmd);