]> git.baikalelectronics.ru Git - kernel.git/commit
bus: moxtet: fix potential stack buffer overflow
authorMarek Behún <marek.behun@nic.cz>
Sat, 15 Feb 2020 14:21:30 +0000 (15:21 +0100)
committerOlof Johansson <olof@lixom.net>
Sat, 15 Feb 2020 18:33:19 +0000 (10:33 -0800)
commitef105dbae8998dd9c6573f40e86466d772c7e6a2
treefd5cfc9f84d65e7b14e8f26bc585416223f19525
parentc08a90db3ab906b712600422acaf1d1cd5e11cc1
bus: moxtet: fix potential stack buffer overflow

The input_read function declares the size of the hex array relative to
sizeof(buf), but buf is a pointer argument of the function. The hex
array is meant to contain hexadecimal representation of the bin array.

Link: https://lore.kernel.org/r/20200215142130.22743-1-marek.behun@nic.cz
Fixes: c73c27fb4547 ("bus: Add support for Moxtet bus")
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reported-by: sohu0106 <sohu0106@126.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
drivers/bus/moxtet.c