slirp: Fix memory leak on small incoming ipv4 packet
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
459621ac1a
commit
99787f69cd
|
@ -85,7 +85,7 @@ ip_input(struct mbuf *m)
|
||||||
DEBUG_ARG("m_len = %d", m->m_len);
|
DEBUG_ARG("m_len = %d", m->m_len);
|
||||||
|
|
||||||
if (m->m_len < sizeof (struct ip)) {
|
if (m->m_len < sizeof (struct ip)) {
|
||||||
return;
|
goto bad;
|
||||||
}
|
}
|
||||||
|
|
||||||
ip = mtod(m, struct ip *);
|
ip = mtod(m, struct ip *);
|
||||||
|
|
Loading…
Reference in a new issue