HomePhabricator

bitmanipulation: fix undefined behavior in bit shift in getbe32

Authored by durin42.

Description

bitmanipulation: fix undefined behavior in bit shift in getbe32

OSS-Fuzz caught this in its ubsan mode[0]. I'm not worried about a
security issue here because in practice this should work out the way
we naively expected, we're just making things explicit to the
compiler with the casts.

0: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8876

Differential Revision: https://phab.mercurial-scm.org/D3729

Details

Committed
durin42Jun 13 2018, 10:24 AM
Differential Revision
D3729: bitmanipulation: fix undefined behavior in bit shift in getbe32
Parents
rHG74b4a54002ec: templatefilters: undeprecate hgdate
Branches
Unknown
Tags
Unknown