]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: add a test case for recent env fix
authorPádraig Brady <P@draigBrady.com>
Mon, 29 Mar 2021 14:47:20 +0000 (15:47 +0100)
committerPádraig Brady <P@draigBrady.com>
Mon, 29 Mar 2021 14:48:39 +0000 (15:48 +0100)
* tests/misc/env-S.pl: Add a test case for recent commit ec6904f0.

tests/misc/env-S.pl

index aa174a7516ce73f8afb1075a006a9d6a7745baf4..73dcb5cfe130c35bbc677bcb61000f3ab450f159 100755 (executable)
@@ -60,6 +60,10 @@ my @Tests =
      # to env, resulting in two arguments ("A" <whitespace> "B").
      ['t3',  qq[-S'printf x%sx\\n A\tB'],     {OUT=>"xAx\nxBx"}],
      ['t4',  qq[-S'printf x%sx\\n A \t B'],   {OUT=>"xAx\nxBx"}],
+     # Ensure \v\f\r\n treated like other whitespace.
+     # From 8.30 - 8.32 these would introduce arguments to printf,
+     # and also crash ASAN builds with out of bounds access.
+     ['t5',  qq[-S'printf x%sx\\n A \t B \013\f\r\n'],   {OUT=>"xAx\nxBx"}],
 
 
      # Test empty strings