Home
last modified time | relevance | path

Searched hist:"06755 a87" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/tools/testing/selftests/powerpc/dscr/
H A Ddscr_sysfs_test.c06755a87 Thu Sep 28 08:34:26 CDT 2017 Seth Forshee <seth.forshee@canonical.com> selftests/powerpc: Use snprintf to construct DSCR sysfs interface paths

Currently sprintf is used, and while paths should never exceed
the size of the buffer it is theoretically possible since
dirent.d_name is 256 bytes. As a result this trips
-Wformat-overflow, and since the test is built with -Wall -Werror
the causes the build to fail. Switch to using snprintf and skip
any paths which are too long for the filename buffer.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
06755a87 Thu Sep 28 08:34:26 CDT 2017 Seth Forshee <seth.forshee@canonical.com> selftests/powerpc: Use snprintf to construct DSCR sysfs interface paths

Currently sprintf is used, and while paths should never exceed
the size of the buffer it is theoretically possible since
dirent.d_name is 256 bytes. As a result this trips
-Wformat-overflow, and since the test is built with -Wall -Werror
the causes the build to fail. Switch to using snprintf and skip
any paths which are too long for the filename buffer.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>