e3366771865867777a3c59ab93805dd0fdf7fc36 — dax 2 months ago 1fe7547
exit with error when too many arguments are present
1 files changed, 6 insertions(+), 0 deletions(-)

M dw.c
M dw.c => dw.c +6 -0
@@ 100,6 100,12 @@ }
  	}
  
+ 	if (optind != argc) {
+ 		fprintf(stderr, "error: too many arguments\n");
+ 		fprintf(stderr, "%s\n", usage);
+ 		exit(EXIT_FAILURE);
+ 	}
+ 
  	if (!passphrase_length) {
  		fprintf(stderr, "error: passphrase_length is 0\n");
  		exit(EXIT_FAILURE);