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