提交 c60174e8 编写于 作者: G Gerd Hoffmann

usb: sanity check setup_index+setup_len in post_load

Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 94c2b6af
......@@ -47,6 +47,10 @@ static int usb_device_post_load(void *opaque, int version_id)
} else {
dev->attached = 1;
}
if (dev->setup_index >= sizeof(dev->data_buf) ||
dev->setup_len >= sizeof(dev->data_buf)) {
return -EINVAL;
}
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册