diff options
author | Ben Hutchings <ben.hutchings@codethink.co.uk> | 2018-08-15 21:44:25 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-05 13:27:06 +0200 |
commit | 7e10f14ebface44a48275c8d6dc1caae3668d5a9 (patch) | |
tree | a6d69dbcdb3c191be3bb6017a90a01ff2584ab75 /drivers/iio/adc/fsl-imx25-gcq.c | |
parent | 222471f7640d9771a993218d825d84825adc805d (diff) |
USB: yurex: Fix buffer over-read in yurex_write()
If the written data starts with a digit, yurex_write() tries to parse
it as an integer using simple_strtoull(). This requires a null-
terminator, and currently there's no guarantee that there is one.
(The sample program at
https://github.com/NeoCat/YUREX-driver-for-Linux/blob/master/sample/yurex_clock.pl
writes an integer without a null terminator. It seems like it must
have worked by chance!)
Always add a null byte after the written data. Enlarge the buffer
to allow for this.
Cc: stable@vger.kernel.org
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iio/adc/fsl-imx25-gcq.c')
0 files changed, 0 insertions, 0 deletions