Commit d4e505c
libbpf-tools/bitesize.bpf.c: Fix potential out-of-bounds access in comm_allowed function
fixes a potential out-of-bounds access in the comm_allowed function. Previously, the condition
in the for loop checked the value of targ_comm[i] before ensuring that i is less than TASK_COMM_LEN.
This could lead to out-of-bounds access if i equals TASK_COMM_LEN.
The condition in the for loop has been updated to check that i is less than TASK_COMM_LEN
before accessing targ_comm[i]. This ensures that targ_comm is not accessed out-of-bounds.1 parent d13cab9 commit d4e505c
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
0 commit comments