]> git.proxmox.com Git - qemu.git/commit
vhost: fix infinite loop on error path
authorMichael S. Tsirkin <mst@redhat.com>
Tue, 14 Sep 2010 11:48:17 +0000 (13:48 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 14 Sep 2010 14:02:23 +0000 (16:02 +0200)
commit6b37c87c96a5b148685e8e6bf09d0aca953cb1a8
treed3ffdfbda72347674b720c5fd0c1c4421e19836d
parentb6601141cd2a170dfe773987b06f716a190ea7e0
vhost: fix infinite loop on error path

file.index is unsigned, hence 'while (--file.index >= 0)'
will loop > forever. Change to while (file.index-- > 0).

Reported-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/vhost_net.c