diff -up a2ps-4.15.5/liba2ps/darray.c.overrun-dynamic a2ps-4.15.5/liba2ps/darray.c --- a2ps-4.15.5/liba2ps/darray.c.overrun-dynamic 2022-06-11 22:16:14.000000000 +0200 +++ a2ps-4.15.5/liba2ps/darray.c 2023-07-25 18:23:24.509882456 +0200 @@ -383,7 +383,7 @@ da_qsort (struct darray * arr) jstack += 2; /* Push pointers to larger subarry on stack. * Process smaller subarrays now */ - if (jstack > QSORT_STACK) + if (jstack >= QSORT_STACK) error (da_exit_error, 0, "da_qsort: QSORT_STACK too small (%d)", QSORT_STACK); if (ir - i + 1 >= j - l) { @@ -461,7 +461,7 @@ da_qsort_with_arg (struct darray * arr, jstack += 2; /* Push pointers to larger subarry on stack. * Process smaller subarrays now */ - if (jstack > QSORT_STACK) + if (jstack >= QSORT_STACK) error (da_exit_error, 0, "da_qsort: QSORT_STACK too small (%d)", QSORT_STACK); if (ir - i + 1 >= j - l) {