summaryrefslogtreecommitdiffstats
path: root/samples/Makefile
diff options
context:
space:
mode:
authorChang-Hsien Tsai <luke.tw@gmail.com>2019-05-19 11:05:44 +0200
committerDaniel Borkmann <daniel@iogearbox.net>2019-05-21 16:36:48 +0200
commitf7c2d64bac1be2ff32f8e4f500c6e5429c1003e0 (patch)
tree9daa3a8015f051b4fc36020d310b266f652627e5 /samples/Makefile
parentbpf: Check sk_fullsock() before returning from bpf_sk_lookup() (diff)
downloadlinux-f7c2d64bac1be2ff32f8e4f500c6e5429c1003e0.tar.xz
linux-f7c2d64bac1be2ff32f8e4f500c6e5429c1003e0.zip
samples, bpf: fix to change the buffer size for read()
If the trace for read is larger than 4096, the return value sz will be 4096. This results in off-by-one error on buf: static char buf[4096]; ssize_t sz; sz = read(trace_fd, buf, sizeof(buf)); if (sz > 0) { buf[sz] = 0; puts(buf); } Signed-off-by: Chang-Hsien Tsai <luke.tw@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'samples/Makefile')
0 files changed, 0 insertions, 0 deletions