]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
added test which can overflow internal list of filenames
authorYann Collet <cyan@fb.com>
Mon, 28 Oct 2019 23:05:42 +0000 (16:05 -0700)
committerYann Collet <cyan@fb.com>
Mon, 28 Oct 2019 23:05:42 +0000 (16:05 -0700)
tests/playTests.sh

index 7712b68aa545663be6796f8a78b155ab50ce0d41..5f23ac555cf3903c4893b86a8e72dadddf4350cc 100755 (executable)
@@ -375,6 +375,10 @@ println "test : survive a list of files which is binary garbage (--filelist=FILE
 ./datagen -P0 -g1M > tmp_badList
 $ZSTD -qq -f --filelist=tmp_badList && die "should have failed : list is binary garbage"  # let's avoid printing binary garbage on console
 
+println "test : try to overflow internal list of files (--filelist=FILE)"
+touch tmp1 tmp2 tmp3 tmp4 tmp5 tmp6
+ls tmp* > tmpList
+$ZSTD -f tmp1 --filelist=tmpList --filelist=tmpList tmp2 tmp3  # can trigger an overflow of internal file list
 rm -rf tmp*