| diff --git a/net/third_party/nss/ssl/ssl3con.c b/net/third_party/nss/ssl/ssl3con.c |
| index 8395f61..8b8b758 100644 |
| --- a/net/third_party/nss/ssl/ssl3con.c |
| +++ b/net/third_party/nss/ssl/ssl3con.c |
| @@ -859,6 +859,11 @@ static SECStatus |
| Null_Cipher(void *ctx, unsigned char *output, int *outputLen, int maxOutputLen, |
| const unsigned char *input, int inputLen) |
| { |
| + if (inputLen > maxOutputLen) { |
| + *outputLen = 0; /* Match PK11_CipherOp in setting outputLen */ |
| + PORT_SetError(SEC_ERROR_OUTPUT_LEN); |
| + return SECFailure; |
| + } |
| *outputLen = inputLen; |
| if (input != output) |
| PORT_Memcpy(output, input, inputLen); |