tokedo
Re:Out-of-bounds read and write in the glibc's qsort()
on Monday February 05, 2024 @05:34PM (#39268168)
A simple solution is to create a C++ file and exposing sorting functions to C. E.g. "void sort_int(int *data, size_t n)". The implementation uses then std::sort.
Unfortunately, qsort is really slow and sometimes barely usable.