"Vincas Miliƫnas" vincas.miliunas@gmail.com writes:
+/*********************************************************************
- Helper function for MSVCRT_qsort_s.
- */
We already have a qsort in ntdll, I'd suggest to copy that (and/or merge possible improvements into it). We don't need two implementations from two different sources.
+/*********************************************************************
- qsort_s (MSVCRT.@)
- */
+void CDECL MSVCRT_qsort_s(void *b, size_t n, size_t s,
- _QSORT_S_COMPARE_FN cmp, void *context)
+{
- const size_t size = n * s;
You probably want to check for overflow.