* [PATCH v3] hw/core/qdev-properties-system: Fix pci bus range in set_pci_host_devaddr()
@ 2020-10-13 9:20 Klaus Herman
2020-10-13 10:34 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 2+ messages in thread
From: Klaus Herman @ 2020-10-13 9:20 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-trivial, Klaus Herman, Paolo Bonzini,
Daniel P. Berrangé, Eduardo Habkost
Fixes: bccb20c49df ("hw/core/qdev-properties: Use qemu_strtoul() in set_pci_host_devaddr()")
Signed-off-by: Klaus Herman <kherman@inbox.lv>
---
hw/core/qdev-properties-system.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c
index 49bdd12..e3dca56 100644
--- a/hw/core/qdev-properties-system.c
+++ b/hw/core/qdev-properties-system.c
@@ -903,7 +903,7 @@ static void set_pci_host_devaddr(Object *obj, Visitor *v, const char *name,
bus = val;
p = (char *)e + 1;
- if (qemu_strtoul(p, &e, 16, &val) < 0 || val > 0x1f || e == p) {
+ if (qemu_strtoul(p, &e, 16, &val) < 0 || val > 0xff || e == p) {
goto inval;
}
if (*e == ':') {
--
2.28.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v3] hw/core/qdev-properties-system: Fix pci bus range in set_pci_host_devaddr()
2020-10-13 9:20 [PATCH v3] hw/core/qdev-properties-system: Fix pci bus range in set_pci_host_devaddr() Klaus Herman
@ 2020-10-13 10:34 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 2+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-10-13 10:34 UTC (permalink / raw)
To: Klaus Herman, qemu-devel
Cc: qemu-trivial, Paolo Bonzini, Daniel P. Berrangé,
Eduardo Habkost
On 10/13/20 11:20 AM, Klaus Herman wrote:
> Fixes: bccb20c49df ("hw/core/qdev-properties: Use qemu_strtoul() in set_pci_host_devaddr()")
> Signed-off-by: Klaus Herman <kherman@inbox.lv>
> ---
> hw/core/qdev-properties-system.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c
> index 49bdd12..e3dca56 100644
> --- a/hw/core/qdev-properties-system.c
> +++ b/hw/core/qdev-properties-system.c
> @@ -903,7 +903,7 @@ static void set_pci_host_devaddr(Object *obj, Visitor *v, const char *name,
> bus = val;
>
> p = (char *)e + 1;
> - if (qemu_strtoul(p, &e, 16, &val) < 0 || val > 0x1f || e == p) {
> + if (qemu_strtoul(p, &e, 16, &val) < 0 || val > 0xff || e == p) {
As this is used to check both bus/slot range, I sent a different
approach to fix this issue:
https://lists.gnu.org/archive/html/qemu-devel/2020-10/msg03604.html
> goto inval;
> }
> if (*e == ':') {
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-13 10:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-13 9:20 [PATCH v3] hw/core/qdev-properties-system: Fix pci bus range in set_pci_host_devaddr() Klaus Herman
2020-10-13 10:34 ` Philippe Mathieu-Daudé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).