diff options
| -rw-r--r-- | src/usr.bin/openssl/apps.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/usr.bin/openssl/apps.c b/src/usr.bin/openssl/apps.c index 7c774e4077..4640519cf1 100644 --- a/src/usr.bin/openssl/apps.c +++ b/src/usr.bin/openssl/apps.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: apps.c,v 1.18 2014/12/28 15:48:52 jsing Exp $ */ | 1 | /* $OpenBSD: apps.c,v 1.19 2014/12/28 16:10:33 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -2271,8 +2271,20 @@ options_parse(int argc, char **argv, struct option *opts, char **unnamed, | |||
| 2271 | continue; | 2271 | continue; |
| 2272 | } | 2272 | } |
| 2273 | 2273 | ||
| 2274 | if (*p == '\0') /* XXX - end of named options. */ | 2274 | /* End of named options (single hyphen). */ |
| 2275 | if (*p == '\0') { | ||
| 2276 | if (++i >= argc) | ||
| 2277 | goto done; | ||
| 2278 | if (argsused != NULL) | ||
| 2279 | goto done; | ||
| 2280 | if (unnamed != NULL && i == argc - 1) { | ||
| 2281 | if (*unnamed != NULL) | ||
| 2282 | goto toomany; | ||
| 2283 | *unnamed = argv[i]; | ||
| 2284 | continue; | ||
| 2285 | } | ||
| 2275 | goto unknown; | 2286 | goto unknown; |
| 2287 | } | ||
| 2276 | 2288 | ||
| 2277 | for (j = 0; opts[j].name != NULL; j++) { | 2289 | for (j = 0; opts[j].name != NULL; j++) { |
| 2278 | opt = &opts[j]; | 2290 | opt = &opts[j]; |
