diff options
Diffstat (limited to 'coreutils/printf.c')
-rw-r--r-- | coreutils/printf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/printf.c b/coreutils/printf.c index 5be3a67cb..5fd5ea303 100644 --- a/coreutils/printf.c +++ b/coreutils/printf.c | |||
@@ -143,7 +143,7 @@ printf_main(int argc, char** argv) | |||
143 | int args_used; | 143 | int args_used; |
144 | 144 | ||
145 | exit_status = 0; | 145 | exit_status = 0; |
146 | if ( **(argv+1) == '-' ) { | 146 | if ( argc <= 1 || **(argv+1) == '-' ) { |
147 | usage (printf_usage); | 147 | usage (printf_usage); |
148 | } | 148 | } |
149 | 149 | ||