summaryrefslogtreecommitdiff
path: root/src/lib/libssl/d1_srtp.c
diff options
context:
space:
mode:
authordoug <>2015-07-31 00:35:06 +0000
committerdoug <>2015-07-31 00:35:06 +0000
commit11c1205d1375c2ebb50608dbd5a4cc26d96685ce (patch)
tree9b5132a01e62b050fe59a7b7f47b3bcfaf1a51dc /src/lib/libssl/d1_srtp.c
parentc399ec1a5a1e334ca2ae5a449ca396abc5b4d043 (diff)
downloadopenbsd-11c1205d1375c2ebb50608dbd5a4cc26d96685ce.tar.gz
openbsd-11c1205d1375c2ebb50608dbd5a4cc26d96685ce.tar.bz2
openbsd-11c1205d1375c2ebb50608dbd5a4cc26d96685ce.zip
Fix SRTP parsing.
jsing@ noticed that during the CBS conversion, an extra CBS_len comparison was introduced. It should be 0 after extracting MKI. ok jsing@ bcook@ deraadt@
Diffstat (limited to 'src/lib/libssl/d1_srtp.c')
-rw-r--r--src/lib/libssl/d1_srtp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/libssl/d1_srtp.c b/src/lib/libssl/d1_srtp.c
index 2974691e3c..45ce5b8d3e 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.14 2015/07/17 17:36:24 doug Exp $ */ 1/* $OpenBSD: d1_srtp.c,v 1.15 2015/07/31 00:35:06 doug 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 *
@@ -313,8 +313,7 @@ ssl_parse_clienthello_use_srtp_ext(SSL *s, const unsigned char *d, int len,
313 CBS_init(&cbs, d, len); 313 CBS_init(&cbs, d, len);
314 /* Pull off the cipher suite list */ 314 /* Pull off the cipher suite list */
315 if (!CBS_get_u16_length_prefixed(&cbs, &ciphers) || 315 if (!CBS_get_u16_length_prefixed(&cbs, &ciphers) ||
316 CBS_len(&ciphers) % 2 || 316 CBS_len(&ciphers) % 2) {
317 CBS_len(&cbs) != 0) {
318 SSLerr(SSL_F_SSL_PARSE_CLIENTHELLO_USE_SRTP_EXT, 317 SSLerr(SSL_F_SSL_PARSE_CLIENTHELLO_USE_SRTP_EXT,
319 SSL_R_BAD_SRTP_PROTECTION_PROFILE_LIST); 318 SSL_R_BAD_SRTP_PROTECTION_PROFILE_LIST);
320 *al = SSL_AD_DECODE_ERROR; 319 *al = SSL_AD_DECODE_ERROR;