Fix BN_hex2bn/BN_dec2bn NULL ptr/heap corruption
[openssl.git] / test / run_tests.pl
index c91478327470b213a28de3c45a0c6a081518b2fd..f7bd6238561c279aa6e7643f5ab87ffb9063bfa4 100644 (file)
@@ -7,10 +7,11 @@ use File::Spec::Functions qw/catdir catfile curdir abs2rel rel2abs/;
 use File::Basename;
 use Test::Harness qw/runtests $switches/;
 
-my $top = $ENV{TOP};
-my $recipesdir = catdir($top, "test", "recipes");
-my $testlib = catdir($top, "test", "testlib");
-my $utillib = catdir($top, "util");
+my $srctop = $ENV{SRCTOP} || $ENV{TOP};
+my $bldtop = $ENV{BLDTOP} || $ENV{TOP};
+my $recipesdir = catdir($srctop, "test", "recipes");
+my $testlib = catdir($srctop, "test", "testlib");
+my $utillib = catdir($srctop, "util");
 
 # It seems that $switches is getting interpreted with 'eval' or something
 # like that, and that we need to take care of backslashes or they will