diff options
author | Jonathan Dieter <jdieter@lesbg.com> | 2017-02-27 11:31:03 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-17 07:16:56 +0300 |
commit | e5dfa3f902b9a642ae8c6997d57d7c41e384a90b (patch) | |
tree | 7ffbc5d1292e713efc36c224e19099dc343214fb /drivers/pinctrl/pinctrl-utils.c | |
parent | 2c93e790e8253552227bf9b46a8d49dca3f71b06 (diff) | |
download | linux-e5dfa3f902b9a642ae8c6997d57d7c41e384a90b.tar.xz |
usbip: Fix potential format overflow in userspace tools
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 'drivers/pinctrl/pinctrl-utils.c')
0 files changed, 0 insertions, 0 deletions