]> Git Repo - qemu.git/commit
hw/core/qdev-properties: Use qemu_strtol() in set_mac() handler
authorPhilippe Mathieu-Daudé <[email protected]>
Wed, 30 Sep 2020 16:49:40 +0000 (18:49 +0200)
committerEduardo Habkost <[email protected]>
Tue, 6 Oct 2020 15:09:35 +0000 (11:09 -0400)
commitc0d67ade53a6db090a1c17676ffcdcf16052dfb4
tree058fc8a255300f23831c57d4807b9fac37eb8ac6
parentd7c5b788295426c1ef48a9ffc3432c51220f69ba
hw/core/qdev-properties: Use qemu_strtol() in set_mac() handler

The MACAddr structure contains an array of uint8_t. Previously
if a value was out of the [0..255] range, it was silently casted
and no input validation was done.
Replace strtol() by qemu_strtol() -- so checkpatch.pl won't
complain if we move this code later -- and return EINVAL if the
input is invalid.

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Message-Id: <20200930164949.1425294[email protected]>
Signed-off-by: Eduardo Habkost <[email protected]>
hw/core/qdev-properties.c
This page took 0.02606 seconds and 4 git commands to generate.