rtl8139: drop tautologous if (ip) {...} statement (CVE-2015-5165)
commitd6812d60e7932de3cd0f602c0ee63dd3d09f1847
authorStefan Hajnoczi <stefanha@redhat.com>
Wed, 15 Jul 2015 16:17:28 +0000 (15 17:17 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Mon, 3 Aug 2015 12:07:54 +0000 (3 13:07 +0100)
treec29a2f44a4ca336aad81ce47af2386fe92fbffc0
parent39b8e7dcaf04cbdb926b478f825b160d852752b5
rtl8139: drop tautologous if (ip) {...} statement (CVE-2015-5165)

The previous patch stopped using the ip pointer as an indicator that the
IP header is present.  When we reach the if (ip) {...} statement we know
ip is always non-NULL.

Remove the if statement to reduce nesting.

Reported-by: 朱东海(启路) <donghai.zdh@alibaba-inc.com>
Reviewed-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
hw/net/rtl8139.c