You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Avoid undefined behavior when handling large ASN.1 integers
Instead of shifting bits off the top of the 32-bit value,
we mask off the top 8 bits before shifting them away, and
restore the sign bit at the end. This still results in
a result that is not what was intended, as this code can
not handle values greater than 2^31-1 or smaller than
-2^31, but this new mechanism results in a "more correct"
garbage out, with no undefined behavior.
0 commit comments