bug 1581986 - fix undefined shift behavior in md4 implementation r=kjacobs
commit3d10b528b0545bc4cdb2f1c13052164adab5123d
authorDana Keeler <dkeeler@mozilla.com>
Mon, 23 Sep 2019 19:17:52 +0000 (23 19:17 +0000)
committerDana Keeler <dkeeler@mozilla.com>
Mon, 23 Sep 2019 19:17:52 +0000 (23 19:17 +0000)
treed6e87fc6613b91da0fa44625e906e9e76afd32c5
parente8cd2193b5b3f1c42bb26c38a535095c073aa59c
bug 1581986 - fix undefined shift behavior in md4 implementation r=kjacobs

Using left shift on a uint8_t promotes it to a signed integer. If the shift is
large enough that the sign bit gets affected, we have undefined behavior. This
patch fixes this by first casting to uint32_t.

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

--HG--
extra : moz-landing-system : lando
security/manager/ssl/md4.c