Date: Mon, 3 May 2004 14:05:49 -0700 (PDT) From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 52163 for review Message-ID: <200405032105.i43L5nUR032930@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=52163 Change 52163 by rwatson@rwatson_tislabs on 2004/05/03 14:05:19 In mac_mbuf_to_label(), don't attempt to extract labels from a NULL mbuf pointer. Don't attempt to convert a NULL tag to a label. Return NULL in both of these cases. Affected files ... .. //depot/projects/trustedbsd/mac/sys/security/mac/mac_net.c#25 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/security/mac/mac_net.c#25 (text+ko) ==== @@ -89,9 +89,12 @@ struct m_tag *tag; struct label *label; + if (mbuf == NULL) + return (NULL); tag = m_tag_find(mbuf, PACKET_TAG_MACLABEL, NULL); + if (tag == NULL) + return (NULL); label = (struct label *)(tag+1); - return (label); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200405032105.i43L5nUR032930>
