[selinux-policy: 528/3172] fix comparison bug

Daniel J Walsh dwalsh at fedoraproject.org
Thu Oct 7 19:50:13 UTC 2010


commit cd8fa412539d3c4bb6b19bbdcc52d19cb0d1faca
Author: Chris PeBenito <cpebenito at tresys.com>
Date:   Mon Aug 1 15:49:05 2005 +0000

    fix comparison bug

 refpolicy/Changelog         |    1 +
 refpolicy/support/fc_sort.c |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/refpolicy/Changelog b/refpolicy/Changelog
index d0929ed..6f1956a 100644
--- a/refpolicy/Changelog
+++ b/refpolicy/Changelog
@@ -1,3 +1,4 @@
+	* Fix comparison bug in fc_sort.
 	* Fix handling of ordered and unordered HTML lists.
 	* Corenetwork now supports multiple network interfaces having the
 	  same type.
diff --git a/refpolicy/support/fc_sort.c b/refpolicy/support/fc_sort.c
index b969479..6c43035 100644
--- a/refpolicy/support/fc_sort.c
+++ b/refpolicy/support/fc_sort.c
@@ -104,7 +104,7 @@ int fc_compare(file_context_node_t *a, file_context_node_t *b)
 	 *  length than the other. */
 	if (a->str_len < b->str_len)
 		return -1;
-	if (b->str_len < b->str_len)
+	if (b->str_len < a->str_len)
 		return 1;
 
 	/* Check to see if either a or b has a specified type


More information about the scm-commits mailing list