Page MenuHomeFreeBSD

D31302.id92761.diff
No OneTemporary

D31302.id92761.diff

diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
--- a/sys/netinet/raw_ip.c
+++ b/sys/netinet/raw_ip.c
@@ -523,8 +523,15 @@
} else {
if (m->m_pkthdr.len > IP_MAXPACKET) {
m_freem(m);
- return(EMSGSIZE);
+ return (EMSGSIZE);
}
+ if (m->m_pkthdr.len < sizeof(*ip)) {
+ m_freem(m);
+ return (EINVAL);
+ }
+ m = m_pullup(m, sizeof(*ip));
+ if (m == NULL)
+ return (ENOMEM);
ip = mtod(m, struct ip *);
hlen = ip->ip_hl << 2;
if (m->m_len < hlen) {

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 16, 6:47 AM (1 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14654741
Default Alt Text
D31302.id92761.diff (487 B)

Event Timeline