i2c: Add a length check to the SMBus write handling
commit629457a13080052c575779e1fd9f5eb5ee6b8ad9
authorCorey Minyard <cminyard@mvista.com>
Mon, 3 Dec 2018 12:52:50 +0000 (3 06:52 -0600)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 3 Dec 2018 13:00:38 +0000 (3 13:00 +0000)
tree2c5ce4c8317703bc421125e09b7acc7fe861b9bd
parent4750e1a888ac3d320607f33b676f299005be98e6
i2c: Add a length check to the SMBus write handling

Avoid an overflow.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Cc: QEMU Stable <qemu-stable@nongnu.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/i2c/smbus.c