summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2014-07-11 12:07:30 +0000
committermiod <miod@openbsd.org>2014-07-11 12:07:30 +0000
commit2fc02bf53f9c26c7c4cd4ac0192d41d6837fde99 (patch)
treee3355cc5ff05808c302ee18e8c1a1345841f91b9
parentMissing initialization; OpenSSL PR#3289 and #3345 via OpenSSL trunk. (diff)
downloadwireguard-openbsd-2fc02bf53f9c26c7c4cd4ac0192d41d6837fde99.tar.xz
wireguard-openbsd-2fc02bf53f9c26c7c4cd4ac0192d41d6837fde99.zip
Missing initialization for error line in error paths; from Coverity via
OpenSSL trunk.
-rw-r--r--lib/libssl/src/ssl/ssl_asn1.c5
-rw-r--r--lib/libssl/ssl_asn1.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/libssl/src/ssl/ssl_asn1.c b/lib/libssl/src/ssl/ssl_asn1.c
index dd958d65702..a721612bbc3 100644
--- a/lib/libssl/src/ssl/ssl_asn1.c
+++ b/lib/libssl/src/ssl/ssl_asn1.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_asn1.c,v 1.28 2014/07/11 09:24:44 beck Exp $ */
+/* $OpenBSD: ssl_asn1.c,v 1.29 2014/07/11 12:07:30 miod Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -287,6 +287,7 @@ d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp, long length)
if ((ssl_version >> 8) >= SSL3_VERSION_MAJOR) {
if (os.length != 2) {
c.error = SSL_R_CIPHER_CODE_WRONG_LENGTH;
+ c.line = __LINE__;
goto err;
}
id = 0x03000000L|
@@ -294,6 +295,7 @@ d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp, long length)
(unsigned long)os.data[1];
} else {
c.error = SSL_R_UNKNOWN_SSL_VERSION;
+ c.line = __LINE__;
goto err;
}
@@ -355,6 +357,7 @@ d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp, long length)
if (os.data != NULL) {
if (os.length > SSL_MAX_SID_CTX_LENGTH) {
c.error = SSL_R_BAD_LENGTH;
+ c.line = __LINE__;
goto err;
} else {
ret->sid_ctx_length = os.length;
diff --git a/lib/libssl/ssl_asn1.c b/lib/libssl/ssl_asn1.c
index dd958d65702..a721612bbc3 100644
--- a/lib/libssl/ssl_asn1.c
+++ b/lib/libssl/ssl_asn1.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_asn1.c,v 1.28 2014/07/11 09:24:44 beck Exp $ */
+/* $OpenBSD: ssl_asn1.c,v 1.29 2014/07/11 12:07:30 miod Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -287,6 +287,7 @@ d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp, long length)
if ((ssl_version >> 8) >= SSL3_VERSION_MAJOR) {
if (os.length != 2) {
c.error = SSL_R_CIPHER_CODE_WRONG_LENGTH;
+ c.line = __LINE__;
goto err;
}
id = 0x03000000L|
@@ -294,6 +295,7 @@ d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp, long length)
(unsigned long)os.data[1];
} else {
c.error = SSL_R_UNKNOWN_SSL_VERSION;
+ c.line = __LINE__;
goto err;
}
@@ -355,6 +357,7 @@ d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp, long length)
if (os.data != NULL) {
if (os.length > SSL_MAX_SID_CTX_LENGTH) {
c.error = SSL_R_BAD_LENGTH;
+ c.line = __LINE__;
goto err;
} else {
ret->sid_ctx_length = os.length;