]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
elf: Fix incorrect comparison in sort_priorities_by_name
authorFlorian Weimer <fweimer@redhat.com>
Wed, 9 Dec 2020 17:56:14 +0000 (18:56 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Wed, 9 Dec 2020 17:56:14 +0000 (18:56 +0100)
Reported-By: Stefan Liebler <stli@linux.ibm.com>
elf/dl-hwcaps.c

index 5a71f8015483c4203f13fd7048395ec203c02c14..000e3c0eb91f3fab568e3d6621390b174e756e4f 100644 (file)
@@ -153,7 +153,7 @@ sort_priorities_by_name (void)
        else
          to_compare = previous->name_length;
        int cmp = memcmp (current->name, previous->name, to_compare);
-       if (cmp >= 0
+       if (cmp > 0
            || (cmp == 0 && current->name_length >= previous->name_length))
          break;