UBSAN: Fix a bit shift overflow
Shifting a 16-bit type by 16 bits is undefined behaviour. The result is at least 32 bits, so let us cast the shift operand to a wider type before shifting.
Showing
Please register or sign in to comment
Shifting a 16-bit type by 16 bits is undefined behaviour. The result is at least 32 bits, so let us cast the shift operand to a wider type before shifting.