diff --git a/glibc-rh2248502-3.patch b/glibc-rh2248502-3.patch new file mode 100644 index 0000000..8b296fd --- /dev/null +++ b/glibc-rh2248502-3.patch @@ -0,0 +1,22 @@ +Author: Florian Weimer +Date: Wed Nov 15 06:31:40 2023 +0100 + + 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. + +diff --git a/stdlib/qsort.c b/stdlib/qsort.c +index ad110e8a892a66e1..1ea31ff4247da7a4 100644 +--- a/stdlib/qsort.c ++++ b/stdlib/qsort.c +@@ -217,7 +217,7 @@ insertion_sort_qsort_partitions (void *const pbase, size_t total_elems, + while ((run_ptr += size) <= end_ptr) + { + tmp_ptr = run_ptr - size; +- while (cmp (run_ptr, tmp_ptr, arg) < 0) ++ while (tmp_ptr != base_ptr && cmp (run_ptr, tmp_ptr, arg) < 0) + tmp_ptr -= size; + + tmp_ptr += size; diff --git a/glibc.spec b/glibc.spec index a258b02..b08aa54 100644 --- a/glibc.spec +++ b/glibc.spec @@ -159,7 +159,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 21 +%global baserelease 22 Release: %{baserelease}%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for @@ -233,6 +233,7 @@ Patch23: glibc-python3.patch Patch24: glibc-rh2244688.patch Patch25: glibc-rh2244992.patch Patch26: glibc-rh2248915.patch +Patch27: glibc-rh2248502-3.patch ############################################################################## # Continued list of core "glibc" package information: @@ -2203,6 +2204,9 @@ update_gconv_modules_cache () %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Wed Nov 15 2023 Florian Weimer - 2.38.9000-22 +- Work around another self-comparison application issue in qsort (#2248502) + * Sat Nov 11 2023 Florian Weimer - 2.38.9000-21 - Fix missing entries in /etc/ld.so.cache (#2248915)