summaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
authorDenis Vlasenko2007-06-25 22:55:34 +0000
committerDenis Vlasenko2007-06-25 22:55:34 +0000
commit1fc6238ffab2cbd09b9ce573b99d82f3eaeb5b77 (patch)
treefc7c75badddb78021ae50a64914a27f6b32d0d4f /shell/ash.c
parent80b8b39899a09c7516920cda5fd343b3086d4824 (diff)
downloadbusybox-1fc6238ffab2cbd09b9ce573b99d82f3eaeb5b77.zip
busybox-1fc6238ffab2cbd09b9ce573b99d82f3eaeb5b77.tar.gz
devfsd: fix formatting (Tito <farmatito@tiscali.it>)
ash: fix SEGV if type has zero parameters
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c
index d9fe641..f33ff4d 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -6986,7 +6986,7 @@ typecmd(int argc, char **argv)
int verbose = 1;
/* type -p ... ? (we don't bother checking for 'p') */
- if (argv[1][0] == '-') {
+ if (argv[1] && argv[1][0] == '-') {
i++;
verbose = 0;
}