summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-05-09 22:25:12 +0000
committerJim Meyering <jim@meyering.net>2003-05-09 22:25:12 +0000
commit0b65f598c89828aff78f11011e7d9d0412dd854c (patch)
treef7be4da2eae20baf416654c45905995f9f85f713 /src
parent12844e567437fb8e7c4e9613e123c13f0b43e5c0 (diff)
downloadcoreutils-0b65f598c89828aff78f11011e7d9d0412dd854c.tar.xz
(main): Don't overrun array bound if argc is 0.
Diffstat (limited to 'src')
-rw-r--r--src/rm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rm.c b/src/rm.c
index bc80e690a..57fefdec5 100644
--- a/src/rm.c
+++ b/src/rm.c
@@ -191,7 +191,7 @@ main (int argc, char **argv)
}
}
- if (optind == argc)
+ if (argc <= optind)
{
if (x.ignore_missing_files)
exit (EXIT_SUCCESS);