(main): check number of arguments

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3421 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1997-09-07 23:34:53 +00:00
parent c522f6cc39
commit e624e0c3a4
5 changed files with 25 additions and 0 deletions

View File

@@ -137,6 +137,12 @@ int main(int argc, char **argv)
if(version_flag)
krb5_errx(context, 0, "%s (%s)\n", __progname, heimdal_version);
argc -= optind;
argv += optind;
if (argc != 0)
usage(1);
if(from_stdin)
fd = STDIN_FILENO;
else{