Re: [Qemu-devel] [PATCH v2 2/3] fw_cfg: fix -boot reboot-timeout error checking

2018-12-11 Thread Philippe Mathieu-Daudé
On 11/21/18 6:10 AM, Li Qiang wrote: > fw_cfg_reboot() gets option parameter "reboot-timeout" with > qemu_opt_get(), then converts it to an integer by hand. It neglects to > check that conversion for errors, and fails to reject negative values. > Positive values above the limit get reported and rep

[Qemu-devel] [PATCH v2 2/3] fw_cfg: fix -boot reboot-timeout error checking

2018-11-20 Thread Li Qiang
fw_cfg_reboot() gets option parameter "reboot-timeout" with qemu_opt_get(), then converts it to an integer by hand. It neglects to check that conversion for errors, and fails to reject negative values. Positive values above the limit get reported and replaced by the limit. This patch checks for con