Skip to content

Commit

Permalink
Bug 1495451 - Fix issues flagged by coverity. r=mt
Browse files Browse the repository at this point in the history
Tags: #secure-revision

Bug #: 1495451

Differential Revision: https://phabricator.services.mozilla.com/D7358
  • Loading branch information
ekr committed Oct 2, 2018
1 parent 6d12b23 commit 4a9f579
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/ssl/tls13con.c
Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions lib/ssl/tls13exthandle.c
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 4a9f579

Please sign in to comment.