PERFORCE change 52163 for review

Robert Watson rwatson at FreeBSD.org
Mon May 3 14:05:51 PDT 2004


http://perforce.freebsd.org/chv.cgi?CH=52163

Change 52163 by rwatson at 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);
 }
 


More information about the p4-projects mailing list