summaryrefslogtreecommitdiff
path: root/include/linux/stackprotector.h
diff options
context:
space:
mode:
authorJonathan Dieter <jdieter@lesbg.com>2017-02-27 10:31:03 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-01-31 12:06:07 +0100
commit579a9885cfe40645bc62207f318d172c4cad7942 (patch)
treea62870d2b3ed05cc9c03a081f4691a42ae2dd277 /include/linux/stackprotector.h
parent4493f49816acc5531ed31ffc600073330393cc61 (diff)
usbip: Fix potential format overflow in userspace tools
commit e5dfa3f902b9a642ae8c6997d57d7c41e384a90b upstream. The usbip userspace tools call sprintf()/snprintf() and don't check for the return value which can lead the paths to overflow, truncating the final file in the path. More urgently, GCC 7 now warns that these aren't checked with -Wformat-overflow, and with -Werror enabled in configure.ac, that makes these tools unbuildable. This patch fixes these problems by replacing sprintf() with snprintf() in one place and adding checks for the return value of snprintf(). Reviewed-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Jonathan Dieter <jdieter@lesbg.com> Acked-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/stackprotector.h')
0 files changed, 0 insertions, 0 deletions