diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libssl/d1_srtp.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/lib/libssl/d1_srtp.c b/src/lib/libssl/d1_srtp.c index 801eab1b76..8f05c4abc8 100644 --- a/src/lib/libssl/d1_srtp.c +++ b/src/lib/libssl/d1_srtp.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: d1_srtp.c,v 1.12 2015/07/14 03:38:26 doug Exp $ */ | 1 | /* $OpenBSD: d1_srtp.c,v 1.13 2015/07/15 21:52:02 beck 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 | * |
| @@ -303,11 +303,16 @@ ssl_parse_clienthello_use_srtp_ext(SSL *s, const unsigned char *d, int len, | |||
| 303 | uint16_t id; | 303 | uint16_t id; |
| 304 | CBS cbs, ciphers, mki; | 304 | CBS cbs, ciphers, mki; |
| 305 | 305 | ||
| 306 | CBS_init(&cbs, d, len); | 306 | if (len < 0) { |
| 307 | SSLerr(SSL_F_SSL_PARSE_CLIENTHELLO_USE_SRTP_EXT, | ||
| 308 | SSL_R_BAD_SRTP_PROTECTION_PROFILE_LIST); | ||
| 309 | *al = SSL_AD_DECODE_ERROR; | ||
| 310 | goto done; | ||
| 311 | } | ||
| 307 | 312 | ||
| 313 | CBS_init(&cbs, d, len); | ||
| 308 | /* Pull off the cipher suite list */ | 314 | /* Pull off the cipher suite list */ |
| 309 | if (len < 0 || | 315 | if (!CBS_get_u16_length_prefixed(&cbs, &ciphers) || |
| 310 | !CBS_get_u16_length_prefixed(&cbs, &ciphers) || | ||
| 311 | CBS_len(&ciphers) % 2 || | 316 | CBS_len(&ciphers) % 2 || |
| 312 | CBS_len(&cbs) != 0) { | 317 | CBS_len(&cbs) != 0) { |
| 313 | SSLerr(SSL_F_SSL_PARSE_CLIENTHELLO_USE_SRTP_EXT, | 318 | SSLerr(SSL_F_SSL_PARSE_CLIENTHELLO_USE_SRTP_EXT, |
