Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Bug 1307599 - Check before copying sidBytes r=mt
Differential Revision: https://nss-dev.phacility.com/D61
  • Loading branch information
Tim Taubert committed Oct 5, 2016
1 parent 75ae03c commit 6c2b0fe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/ssl/ssl3con.c
Expand Up @@ -6896,7 +6896,9 @@ ssl3_HandleServerHelloPart2(sslSocket *ss, const SECItem *sidBytes,

sid->version = ss->version;
sid->u.ssl3.sessionIDLength = sidBytes->len;
PORT_Memcpy(sid->u.ssl3.sessionID, sidBytes->data, sidBytes->len);
if (sidBytes->len > 0) {
PORT_Memcpy(sid->u.ssl3.sessionID, sidBytes->data, sidBytes->len);
}

sid->u.ssl3.keys.extendedMasterSecretUsed =
ssl3_ExtensionNegotiated(ss, ssl_extended_master_secret_xtn);
Expand Down

0 comments on commit 6c2b0fe

Please sign in to comment.