[Qemu-devel] [PATCH v2 for-2.2 3/4] pcnet: fix Negative array index read

2014-11-20 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com s-xmit_pos maybe assigned to a negative value (-1), but in this branch variable s-xmit_pos as an index to array s-buffer. Let's add a check for s-xmit_pos. Signed-off-by: Gonglei arei.gong...@huawei.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com

Re: [Qemu-devel] [PATCH v2 for-2.2 3/4] pcnet: fix Negative array index read

2014-11-20 Thread Jason Wang
On 11/20/2014 07:35 PM, arei.gong...@huawei.com wrote: From: Gonglei arei.gong...@huawei.com s-xmit_pos maybe assigned to a negative value (-1), but in this branch variable s-xmit_pos as an index to array s-buffer. Let's add a check for s-xmit_pos. Signed-off-by: Gonglei