]> git.ipfire.org Git - thirdparty/qemu.git/commit
rtl8139: drop tautologous if (ip) {...} statement (CVE-2015-5165)
authorStefan Hajnoczi <stefanha@redhat.com>
Wed, 15 Jul 2015 16:17:28 +0000 (17:17 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 4 Aug 2015 17:33:30 +0000 (12:33 -0500)
commit6722c126f385397a0d010e391fea26eaeea14586
treefe48aa80ff9d93ca218cf3e2f16c8f1685a51828
parent8dd45dcd83bd819e3fe9927e819ba9441b4f0ccc
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>
(cherry picked from commit d6812d60e7932de3cd0f602c0ee63dd3d09f1847)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/net/rtl8139.c