diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-12-18 23:37:58 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-12-18 23:37:58 +0100 |
commit | 8dc129f8fda9b93b170c2e78d999240cb2898c85 (patch) | |
tree | 5216ae5e300020339742df9ae063b1036da84a0d | |
parent | b0adfa46f3176117bdd23ea20454464dd82a6a9f (diff) | |
download | curl-bagder/nss-noclobbe-ciphers.tar.gz |
fixup special handling for the too long casebagder/nss-noclobbe-ciphers
-rw-r--r-- | lib/vtls/nss.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/vtls/nss.c b/lib/vtls/nss.c index dbe049449..260ff0b04 100644 --- a/lib/vtls/nss.c +++ b/lib/vtls/nss.c @@ -343,7 +343,11 @@ static SECStatus set_ciphers(struct Curl_easy *data, PRFileDesc *model, else len = strlen(cipher); - if(len && (len < MAX_CIPHER_LENGTH)) { + if(len > MAX_CIPHER_LENGTH) { + failf(data, "Bad cipher list"); + return SECFailure; + } + else if(len) { memcpy(name, cipher, len); name[len] = 0; |