Guard against invalid memory read
[ffmpeg.git] / tests / regression-funcs.sh
index c09b39c..7aa57e0 100755 (executable)
@@ -7,20 +7,19 @@
 test="${1#regtest-}"
 test_ref=$2
 raw_src_dir=$3
-outfile_prefix=$4
-target_exec=$5
-target_path=$6
+target_exec=$4
+target_path=$5
 
 datadir="./tests/data"
 target_datadir="${target_path}/${datadir}"
 
 this="$test.$test_ref"
 logfile="$datadir/$this.regression"
-outfile="$datadir/${outfile_prefix}-"
+outfile="$datadir/$test_ref/"
 errfile="$datadir/$this.err"
 
 # various files
-ffmpeg="$target_exec ${target_path}/ffmpeg_g"
+ffmpeg="$target_exec ${target_path}/ffmpeg"
 tiny_psnr="tests/tiny_psnr"
 benchfile="$datadir/$this.bench"
 bench="$datadir/$this.bench.tmp"
@@ -35,6 +34,7 @@ crcfile="$datadir/$this.crc"
 target_crcfile="$target_datadir/$this.crc"
 
 mkdir -p "$datadir"
+mkdir -p "$outfile"
 
 [ "${V-0}" -gt 0 ] && echov=echo || echov=:
 [ "${V-0}" -gt 1 ] || exec 2>$errfile