Re: [PATCH net] sctp: Fix undefined behavior in left shift operation

From: patchwork-bot+netdevbpf
Date: Wed Feb 19 2025 - 22:10:08 EST


Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@xxxxxxxxxx>:

On Tue, 18 Feb 2025 16:12:16 +0800 you wrote:
> According to the C11 standard (ISO/IEC 9899:2011, 6.5.7):
> "If E1 has a signed type and E1 x 2^E2 is not representable in the result
> type, the behavior is undefined."
>
> Shifting 1 << 31 causes signed integer overflow, which leads to undefined
> behavior.
>
> [...]

Here is the summary with links:
- [net] sctp: Fix undefined behavior in left shift operation
https://git.kernel.org/netdev/net/c/606572eb22c1

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html