446cf2
commit 0d4ed9d40efa84e8dc88e64cf337c8e95af7b045
446cf2
Author: Florian Weimer <fweimer@redhat.com>
446cf2
Date:   Wed Dec 9 18:56:14 2020 +0100
446cf2
446cf2
    elf: Fix incorrect comparison in sort_priorities_by_name
446cf2
    
446cf2
    Reported-By: Stefan Liebler <stli@linux.ibm.com>
446cf2
446cf2
diff --git a/elf/dl-hwcaps.c b/elf/dl-hwcaps.c
446cf2
index 098173a84c43c1fd..50d764ae8707f46d 100644
446cf2
--- a/elf/dl-hwcaps.c
446cf2
+++ b/elf/dl-hwcaps.c
446cf2
@@ -153,7 +153,7 @@ sort_priorities_by_name (void)
446cf2
 	else
446cf2
 	  to_compare = previous->name_length;
446cf2
 	int cmp = memcmp (current->name, previous->name, to_compare);
446cf2
-	if (cmp >= 0
446cf2
+	if (cmp > 0
446cf2
 	    || (cmp == 0 && current->name_length >= previous->name_length))
446cf2
 	  break;
446cf2