]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
runtests.pl: properly print the test if it contains binary zeros
authorFabian Keil <fk@fabiankeil.de>
Sun, 24 Jan 2021 14:12:23 +0000 (15:12 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 7 Jan 2022 09:01:44 +0000 (10:01 +0100)
tests/runtests.pl

index 7ac22035b00d9e85dbe771fb596086dfb2d2d1bd..066a91bf5c2fa6a1887d49e05dc2f17dccbccf0c 100755 (executable)
@@ -3763,7 +3763,9 @@ sub singletest {
 
     # save the new version
     open(D, ">$otest");
-    print D @entiretest;
+    foreach my $bytes (@entiretest) {
+        print D pack('a*', $bytes) or die "Failed to print '$bytes': $!";
+    }
     close(D);
 
     # in case the process changed the file, reload it