Skip to content
Snippets Groups Projects
Commit de71c15d authored by Marc-André Lureau's avatar Marc-André Lureau
Browse files

upd6: check udp6_input buffer size

parent 2eca0838
No related branches found
No related tags found
Loading
......@@ -31,7 +31,10 @@ void udp6_input(struct mbuf *m)
ip = mtod(m, struct ip6 *);
m->m_len -= iphlen;
m->m_data += iphlen;
uh = mtod(m, struct udphdr *);
uh = mtod_check(m, sizeof(struct udphdr));
if (uh == NULL) {
goto bad;
}
m->m_len += iphlen;
m->m_data -= iphlen;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment