The parameters to qsort()'s comparator is a pointer to the items being sorted, not a pointer to a pointer to the items being sorted. As a result of this bug, soundio_sort_channel_layouts() doesn't correctly sort layouts and accesses out-of-bounds memory addresses that may cause a crash.
The parameters to
qsort()
's comparator is a pointer to the items being sorted, not a pointer to a pointer to the items being sorted. As a result of this bug,soundio_sort_channel_layouts()
doesn't correctly sort layouts and accesses out-of-bounds memory addresses that may cause a crash.