Thread (2 messages) 2 messages, 2 authors, 2025-02-20

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

From: patchwork-bot+netdevbpf@kernel.org
Date: 2025-02-20 03:10:01
Also in: linux-sctp, lkml

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski [off-list ref]:

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

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help