#! /bin/sh

# CVE-2023-34318
# A heap buffer overflow vulnerability was found in sox, in the startread
# function at sox/src/hcom.c:160:41. This flaw can lead to a denial of service,
# code execution, or information disclosure.

# 14.4.2:
# 

rm -f core out.aiff

${sox:-sox} --single-threaded poc_file -t aiff out.aiff
status=$?

rm -f core

case "$status" in
0) status=255;;
2) status=0;;
esac

exit $status
