Re: [Qemu-devel] [PATCH] hw/net/e1000: fix integer endianness

2015-03-17 Thread Shannon Zhao
On 2015/3/18 1:05, Stefan Hajnoczi wrote: > On Fri, Mar 13, 2015 at 01:21:59PM +0800, Shannon Zhao wrote: >> It's detected by coverity.In is_vlan_packet s->mac_reg[VET] is >> unsigned int but is dereferenced as a narrower unsigned short. >> This may lead to unexpected results depending on machine >

Re: [Qemu-devel] [PATCH] hw/net/e1000: fix integer endianness

2015-03-17 Thread Stefan Hajnoczi
On Fri, Mar 13, 2015 at 01:21:59PM +0800, Shannon Zhao wrote: > It's detected by coverity.In is_vlan_packet s->mac_reg[VET] is > unsigned int but is dereferenced as a narrower unsigned short. > This may lead to unexpected results depending on machine > endianness. > > Signed-off-by: Shannon Zhao

Re: [Qemu-devel] [PATCH] hw/net/e1000: fix integer endianness

2015-03-13 Thread Paolo Bonzini
On 13/03/2015 06:21, Shannon Zhao wrote: > It's detected by coverity.In is_vlan_packet s->mac_reg[VET] is > unsigned int but is dereferenced as a narrower unsigned short. > This may lead to unexpected results depending on machine > endianness. Sounds good. CCing Stefan, net/ maintainer. > Sign

[Qemu-devel] [PATCH] hw/net/e1000: fix integer endianness

2015-03-12 Thread Shannon Zhao
It's detected by coverity.In is_vlan_packet s->mac_reg[VET] is unsigned int but is dereferenced as a narrower unsigned short. This may lead to unexpected results depending on machine endianness. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/net/e1000.c | 4 ++-- 1 file changed,