Correcting string_sort stack memory allocation