virito-pci: fix OVERRUN problem
commit3750dabc69d76f0938cc726a64a70e4ae2fe21df
authorGonglei <arei.gonglei@huawei.com>
Tue, 23 Jun 2015 01:53:04 +0000 (23 09:53 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 23 Jun 2015 06:14:13 +0000 (23 08:14 +0200)
treec8b98af13875108b8cb9a4c8f92e443db233d3b4
parent0c8ff723bd29e5c8b2ca989f857ae5c37ec49c4e
virito-pci: fix OVERRUN problem

Overrunning array "proxy->guest_features" of 2 4-byte
elements at element index 2 (byte offset 8) using index
"proxy->gfselect" (which evaluates to 2). Normally, the
Linux kernel driver just read/write '0' or '1' as the
"proxy->gfselect" values, so using '<' instead of '=<' to
make coverity happy and avoid potential harm.

Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/virtio-pci.c