diff options
| -rw-r--r-- | src/lib/libcrypto/evp/evp_key.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/libcrypto/evp/evp_key.c b/src/lib/libcrypto/evp/evp_key.c index debd1b7561..91d0fc0de9 100644 --- a/src/lib/libcrypto/evp/evp_key.c +++ b/src/lib/libcrypto/evp/evp_key.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: evp_key.c,v 1.25 2018/08/14 17:51:36 tb Exp $ */ | 1 | /* $OpenBSD: evp_key.c,v 1.26 2018/08/14 17:59:26 tb Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -103,6 +103,7 @@ EVP_read_pw_string_min(char *buf, int min, int len, const char *prompt, | |||
| 103 | 103 | ||
| 104 | if (len > BUFSIZ) | 104 | if (len > BUFSIZ) |
| 105 | len = BUFSIZ; | 105 | len = BUFSIZ; |
| 106 | /* Ensure that 0 <= min <= len - 1. In particular, 1 <= len. */ | ||
| 106 | if (min < 0 || len - 1 < min) | 107 | if (min < 0 || len - 1 < min) |
| 107 | return -1; | 108 | return -1; |
| 108 | if ((prompt == NULL) && (prompt_string[0] != '\0')) | 109 | if ((prompt == NULL) && (prompt_string[0] != '\0')) |
