Commit 4a9f5795 authored by EKR's avatar EKR

Bug 1495451 - Fix issues flagged by coverity. r=mt

Tags: #secure-revision

Bug #: 1495451

Differential Revision: https://phabricator.services.mozilla.com/D7358
parent 6d12b232
......@@ -3449,6 +3449,7 @@ tls13_CopyKeyShareEntry(TLS13KeyShareEntry *o)
if (SECSuccess != SECITEM_CopyItem(NULL, &n->key_exchange, &o->key_exchange)) {
PORT_Free(n);
return NULL;
}
n->group = o->group;
return n;
......
......@@ -249,6 +249,7 @@ tls13_ClientHandleKeyShareXtn(const sslSocket *ss, TLSExtensionData *xtnData,
}
if (SSL_READER_REMAINING(&rdr)) {
tls13_DestroyKeyShareEntry(ks);
PORT_SetError(SSL_ERROR_RX_MALFORMED_KEY_SHARE);
return SECFailure;
}
......@@ -1310,6 +1311,9 @@ tls13_ServerHandleEsniXtn(const sslSocket *ss, TLSExtensionData *xtnData,
PRUint64 tmp;
while (SSL_READER_REMAINING(&sniRdr)) {
rv = sslRead_ReadNumber(&sniRdr, 1, &tmp);
if (rv != SECSuccess) {
goto loser;
}
if (tmp != 0) {
goto loser;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment