diff options
| author | Kuan-Wei Chiu <[email protected]> | 2024-09-08 14:00:09 +0000 |
|---|---|---|
| committer | Andrii Nakryiko <[email protected]> | 2024-09-09 22:57:09 +0000 |
| commit | 4cdc0e4ce5e893bc92255f5f734d983012f2bc2e (patch) | |
| tree | 95ccd61a746435eab3bcb4ce2c320cdb9c674b64 /tools/lib/bpf/libbpf.c | |
| parent | libbpf: Fixed getting wrong return address on arm64 architecture (diff) | |
| download | kernel-4cdc0e4ce5e893bc92255f5f734d983012f2bc2e.tar.gz kernel-4cdc0e4ce5e893bc92255f5f734d983012f2bc2e.zip | |
bpftool: Fix undefined behavior caused by shifting into the sign bit
Replace shifts of '1' with '1U' in bitwise operations within
__show_dev_tc_bpf() to prevent undefined behavior caused by shifting
into the sign bit of a signed integer. By using '1U', the operations
are explicitly performed on unsigned integers, avoiding potential
integer overflow or sign-related issues.
Signed-off-by: Kuan-Wei Chiu <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Acked-by: Quentin Monnet <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/lib/bpf/libbpf.c')
0 files changed, 0 insertions, 0 deletions
