Commit c479f5e
selftests/bpf: Fix read_iter buffer termination in test_bpffs
read_iter() always NUL-terminated at the end of the buffer, so strstr()
could scan uninitialized stack bytes on short reads. Terminate at len and
use O_RDONLY.
Signed-off-by: Sun Jian <sun.jian.kdev@gmail.com>1 parent ebefa82 commit c479f5e
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
| 23 | + | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
0 commit comments