diff options
Diffstat (limited to 'slirp')
-rw-r--r-- | slirp/slirp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/slirp/slirp.c b/slirp/slirp.c index de4b4806f4..17b40e249a 100644 --- a/slirp/slirp.c +++ b/slirp/slirp.c @@ -654,6 +654,9 @@ void slirp_input(const uint8_t *pkt, int pkt_len) if (!m) return; /* Note: we add to align the IP header */ + if (M_FREEROOM(m) < pkt_len + 2) { + m_inc(m, pkt_len + 2); + } m->m_len = pkt_len + 2; memcpy(m->m_data + 2, pkt, pkt_len); |