]> git.ipfire.org Git - thirdparty/glibc.git/commit
stdlib: Avoid another self-comparison in qsort
authorFlorian Weimer <fweimer@redhat.com>
Tue, 21 Nov 2023 15:45:35 +0000 (16:45 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Tue, 21 Nov 2023 15:45:47 +0000 (16:45 +0100)
commite4d8117b82065dc72e8df80097360e7c05a349b9
tree6874c1f8d0da6e199a725d03df8f1b46f7f04bef
parentdd858522bf36ae16496ea01ff8b65e16b4e5c22b
stdlib: Avoid another self-comparison in qsort

In the insertion phase, we could run off the start of the array if the
comparison function never runs zero.  In that case, it never finds the
initial element that terminates the iteration.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
stdlib/qsort.c