=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/signify/signify.c,v retrieving revision 1.1 retrieving revision 1.2 diff -c -r1.1 -r1.2 *** src/usr.bin/signify/signify.c 2013/12/31 03:03:32 1.1 --- src/usr.bin/signify/signify.c 2013/12/31 03:08:48 1.2 *************** *** 1,4 **** ! /* $OpenBSD: signify.c,v 1.1 2013/12/31 03:03:32 tedu Exp $ */ /* * Copyright (c) 2013 Ted Unangst * --- 1,4 ---- ! /* $OpenBSD: signify.c,v 1.2 2013/12/31 03:08:48 tedu Exp $ */ /* * Copyright (c) 2013 Ted Unangst * *************** *** 65,71 **** usage(void) { fprintf(stderr, "usage: %s [-P] [-i input] [-p pubkey] [-s seckey] " ! "generate|sign|verify", __progname); exit(1); } --- 65,71 ---- usage(void) { fprintf(stderr, "usage: %s [-P] [-i input] [-p pubkey] [-s seckey] " ! "generate|sign|verify\n", __progname); exit(1); } *************** *** 324,330 **** rounds = 42; ! while ((ch = getopt(argc, argv, "I:NO:P:S:")) != -1) { switch (ch) { case 'I': inputfile = optarg; --- 324,330 ---- rounds = 42; ! while ((ch = getopt(argc, argv, "I:NO:P:S:V:")) != -1) { switch (ch) { case 'I': inputfile = optarg; *************** *** 349,360 **** break; } } if (argc != 0) usage(); if (inputfile && !sigfile) { if (snprintf(sigfilebuf, sizeof(sigfilebuf), "%s.sig", ! inputfile) >= sizeof(sigfile)) errx(1, "path too long"); sigfile = sigfilebuf; } --- 349,361 ---- break; } } + argc -= optind; if (argc != 0) usage(); if (inputfile && !sigfile) { if (snprintf(sigfilebuf, sizeof(sigfilebuf), "%s.sig", ! inputfile) >= sizeof(sigfilebuf)) errx(1, "path too long"); sigfile = sigfilebuf; }