OSDN Git Service

hw/i2c: pmbus: block uninitialised string reads
authorTitus Rwantare <titusr@google.com>
Wed, 22 Mar 2023 17:55:12 +0000 (17:55 +0000)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Thu, 30 Mar 2023 13:03:36 +0000 (15:03 +0200)
commit95bf34186577a3fc8d8b686bf6bc253a7f0d8c61
tree00fcc42f33a8b1b38d3ac9362bdf1ed437c83888
parent9d403d27bc85928aa9b8eb53fcceb2d7745d51ac
hw/i2c: pmbus: block uninitialised string reads

Devices models calling pmbus_send_string can't be relied upon to
send a non-zero pointer. This logs an error and doesn't segfault.

Reviewed-by: Patrick Venture <venture@google.com>
Signed-off-by: Titus Rwantare <titusr@google.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230322175513.1550412-5-titusr@google.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
hw/i2c/pmbus_device.c