OpenSSL::Test: When prefixing command with $^X on Windows, fix it up!
authorRichard Levitte <levitte@openssl.org>
Sat, 1 May 2021 05:29:27 +0000 (07:29 +0200)
committerRichard Levitte <levitte@openssl.org>
Tue, 4 May 2021 08:16:33 +0000 (10:16 +0200)
The perl interpreter name itself might contain spaces and need quoting.
__fixup_prg() does this for us.

Fixes #14256

Co-authored-by: Tomáš Mráz <tomas@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15084)

util/perl/OpenSSL/Test.pm

index 4dc1bad188644a653a12eb081cd6b62c9bba4e02..55f26cc63090bd94d1a0eb2967cb9a4f919f9591 100644 (file)
@@ -1232,7 +1232,7 @@ sub __wrap_cmd {
             # In the Windows case, we run perl explicitly.  We might not
             # need it, but that depends on if the user has associated the
             # '.pl' extension with a perl interpreter, so better be safe.
-            @prefix = ( $^X, $std_wrapper );
+            @prefix = ( __fixup_prg($^X), $std_wrapper );
         } else {
             # Otherwise, we assume Unix semantics, and trust that the #!
             # line activates perl for us.