Date: Fri, 28 Sep 2018 10:02:47 +0000 (UTC) From: "Andrey V. Elsukov" <ae@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r338992 - stable/11/sys/dev/ffec Message-ID: <201809281002.w8SA2l1c050606@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ae Date: Fri Sep 28 10:02:47 2018 New Revision: 338992 URL: https://svnweb.freebsd.org/changeset/base/338992 Log: MFC r338857: Fix possible NULL pointer dereference in ffec_alloc_mbufcl(). PR: 231514 Modified: stable/11/sys/dev/ffec/if_ffec.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ffec/if_ffec.c ============================================================================== --- stable/11/sys/dev/ffec/if_ffec.c Fri Sep 28 00:01:45 2018 (r338991) +++ stable/11/sys/dev/ffec/if_ffec.c Fri Sep 28 10:02:47 2018 (r338992) @@ -799,7 +799,8 @@ ffec_alloc_mbufcl(struct ffec_softc *sc) struct mbuf *m; m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); - m->m_pkthdr.len = m->m_len = m->m_ext.ext_size; + if (m != NULL) + m->m_pkthdr.len = m->m_len = m->m_ext.ext_size; return (m); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201809281002.w8SA2l1c050606>