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