C99, C11, POSIX, and the glibc implementation do guarantee that the pointers passed to the qsort comparison function lie within the array. Signed-off-by: Anders Kaseorg <andersk@mit.edu>