summaryrefslogtreecommitdiffstats
path: root/Configure
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2024-02-07 04:38:28 +0100
committerTomas Mraz <tomas@openssl.org>2024-02-08 11:39:51 +0100
commitecabdf39aa461c7d78f2c6ce24d1f168a7cbc7c5 (patch)
treea030924cb0546f585afd135ad69131c994ee36a1 /Configure
parent2a2561709ab316584d8b0a6220e244094fe507f5 (diff)
Configure: Fix ordering bug when processing split DEPENDs
Configure was recently made to process this sort of line: DEPEND[generated]=util/perl|OpenSSL/something.pm Unfortunately, in processing such lines, the order in which paths were recomputed caused some resulting paths to be faulty under some circumstances. This change fixes that. Fixes #22853 Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23500) (cherry picked from commit 64cae4064405384cf7fe130a1e0189725db5e877)
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure5
1 files changed, 3 insertions, 2 deletions
diff --git a/Configure b/Configure
index 934b0d09c0..c09bec39f6 100755
--- a/Configure
+++ b/Configure
@@ -2487,10 +2487,11 @@ EOF
&& $f =~ m/^(.*?)\|(.*)$/) {
$i = $1;
$m = $2;
- $i = cleanfile($sourced, $i, $blddir, 1);
- $i2 = cleanfile($buildd, $i, $blddir);
+ # We must be very careful to modify $i last
$d = cleanfile($sourced, "$i/$m", $blddir, 1);
$d2 = cleanfile($buildd, "$i/$m", $blddir);
+ $i2 = cleandir($buildd, $i, $blddir);
+ $i = cleandir($sourced, $i, $blddir, 1);
} else {
$d = cleanfile($sourced, $f, $blddir, 1);
$d2 = cleanfile($buildd, $f, $blddir);