forked from sox_ng/sox_ng
25 lines
522 B
Bash
25 lines
522 B
Bash
#! /bin/sh
|
|
|
|
# CVE-2022-31651
|
|
# In SoX 14.4.2, there is an assertion failure in rate_init in rate.c
|
|
|
|
# 14.4.2 and 42b355 say:
|
|
# sox: rate.c:303: rate_init: Assertion `factor > 0' failed.
|
|
# Aborted (core dumped)
|
|
|
|
# Debian says
|
|
# sox FAIL formats: can't open input file `poc_assert_rate_init': implausibly large number of channels
|
|
|
|
rm -f core core.*
|
|
|
|
${sox:-sox} --single-threaded poc_assert_rate_init -t aiff /dev/null
|
|
status=$?
|
|
|
|
rm -f core core.* out.wav
|
|
|
|
case "$status" in
|
|
0) status=255;;
|
|
2) status=0;;
|
|
esac
|
|
|
|
exit $status
|