Commit 6aa30e66 authored by Kevin Jacobs's avatar Kevin Jacobs

Bug 1618915 - Fix UBSAN issue in ssl_ParseSessionTicket r=jcj,bbeurdouche

Differential Revision: https://phabricator.services.mozilla.com/D66130

--HG--
extra : moz-landing-system : lando
parent 9d0be6ff
......@@ -1034,7 +1034,9 @@ ssl_ParseSessionTicket(sslSocket *ss, const SECItem *decryptedTicket,
PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
return SECFailure;
}
parsedTicket->timestamp = (PRTime)temp << 32;
/* Cast to avoid undefined behavior if the top bit is set. */
parsedTicket->timestamp = (PRTime)((PRUint64)temp << 32);
rv = ssl3_ExtConsumeHandshakeNumber(ss, &temp, 4, &buffer, &len);
if (rv != SECSuccess) {
PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
......
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