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
The implementation impl Follow for bool is defined here and ends up calling read_scalar_at::<bool>(...). read_scalar_at (defined here) is for all intents and purposes a transmute and therefore given a byte that is not exactly 0 or 1 will produce a value of bool that has an invalid underlying bit pattern. That is UB in Rust. Invoking it is as easy as
bool::follow(b"\x42",0)
or something along the lines.
The text was updated successfully, but these errors were encountered:
The implementation
impl Follow for bool
is defined here and ends up callingread_scalar_at::<bool>(...)
.read_scalar_at
(defined here) is for all intents and purposes atransmute
and therefore given a byte that is not exactly0
or1
will produce a value ofbool
that has an invalid underlying bit pattern. That is UB in Rust. Invoking it is as easy asor something along the lines.
The text was updated successfully, but these errors were encountered: