WSL2-Linux-Kernel/tools/testing/selftests
Shuah Khan ed675ed9da selftests: ir: fix warning: "%s" directive output may be truncated ’ directive output may be truncated
Fix the following warning by sizing the buffer to max. of sysfs
path max. size + d_name max. size.

gcc -Wall -O2 -I../../../include/uapi ir_loopback.c  -o ../tools/testing/selftests/ir/ir_loopback
ir_loopback.c: In function ‘lirc_open’:
ir_loopback.c:71:37: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 95 [-Wformat-truncation=]
    snprintf(buf, sizeof(buf), "/dev/%s", dent->d_name);
                                     ^~
In file included from /usr/include/stdio.h:862:0,
                 from ir_loopback.c:14:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10: note: ‘__builtin___snprintf_chk’ output between 6 and 261 bytes into a destination of size 100
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Shuah Khan <shuah@kernel.org>
Acked-by: Sean Young <sean@mess.org>
Signed-off-by: Shuah Khan <shuah@kernel.org>
2019-02-13 09:10:30 -07:00
..
android selftests: Fix test errors related to lib.mk khdr target 2018-12-17 09:17:55 -07:00
bpf bpf, selftests: fix handling of sparse CPU allocations 2019-01-31 23:13:22 +01:00
breakpoints
capabilities
cgroup
cpu-hotplug selftests: cpu-hotplug: fix case where CPUs offline > CPUs present 2019-01-25 14:57:45 -07:00
cpufreq
drivers selftests: mlxsw: Test FDB offload indication 2019-01-18 15:12:16 -08:00
efivarfs
exec
filesystems selftests: add binderfs selftests 2019-01-30 15:19:56 +01:00
firmware selftests: firmware: add CONFIG_FW_LOADER_USER_HELPER_FALLBACK to config 2018-11-27 14:20:36 -07:00
ftrace Tracing changes for v4.21: 2018-12-31 11:46:59 -08:00
futex selftests: Fix test errors related to lib.mk khdr target 2018-12-17 09:17:55 -07:00
gpio selftests: gpio-mockup-chardev: Check asprintf() for error 2019-01-16 15:02:57 -07:00
ia64
ima selftests/ima: kexec_load syscall test 2018-12-11 07:19:47 -05:00
intel_pstate
ipc
ir selftests: ir: fix warning: "%s" directive output may be truncated ’ directive output may be truncated 2019-02-13 09:10:30 -07:00
kcmp
kmod
kvm KVM: selftests: check returned evmcs version range 2019-01-25 19:11:38 +01:00
lib
locking
media_tests
membarrier
memfd
memory-hotplug
mount
mqueue
net linux-kselftest-5.0-rc5 2019-01-31 11:11:18 -08:00
netfilter selftests: netfilter: add simple masq/redirect test cases 2019-02-04 14:21:27 +01:00
networking/timestamping selftests/txtimestamp: Fix an equals vs assign bug 2019-01-15 13:33:44 -08:00
nsfs
ntb
powerpc selftests/powerpc: Add checks for transactional sigreturn 2018-12-21 14:46:50 +11:00
prctl
proc proc: fix /proc/net/* after setns(2) 2019-02-01 15:46:22 -08:00
pstore
ptp
ptrace
rcutorture Merge branches 'bug.2018.11.12a', 'consolidate.2018.12.01a', 'doc.2018.11.12a', 'fixes.2018.11.12a', 'initrd.2018.11.08b', 'sil.2018.11.12a' and 'srcu.2018.11.27a' into HEAD 2018-12-01 12:43:16 -08:00
rseq
rtc selftests: rtc: rtctest: add alarm test on minute boundary 2019-01-14 18:49:14 -07:00
seccomp selftests/seccomp: Actually sleep for 1/10th second 2019-02-13 08:52:42 -07:00
sigaltstack
size
sparc64
splice
static_keys
sync
sysctl
tc-testing selftests: tc-testing: fix parsing of ife type 2019-01-16 14:05:42 -08:00
timers selftests: timers: use LDLIBS instead of LDFLAGS 2019-01-28 08:02:12 -07:00
uevent
user
vDSO
vm selftests/vm/gup_benchmark.c: match gup struct to kernel 2019-01-15 13:48:24 -07:00
watchdog selftests: watchdog: fix spelling mistake "experies" -> "expires" 2018-12-13 13:03:19 -07:00
x86 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-01-27 12:02:00 -08:00
zram
.gitignore
Makefile selftests: add binderfs selftests 2019-01-30 15:19:56 +01:00
gen_kselftest_tar.sh
kselftest.h selftest: include stdio.h in kselftest.h 2019-02-13 08:34:47 -07:00
kselftest_harness.h selftests/harness: Update named initializer syntax 2019-02-13 08:52:35 -07:00
kselftest_install.sh
lib.mk selftests: Fix test errors related to lib.mk khdr target 2018-12-17 09:17:55 -07:00