Protect against meta-characters in library names (e.g. "libestdc++").
Mostly from pvalchev@
This commit is contained in:
parent
ca2365aa6a
commit
a653eafeac
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
# $OpenBSD: resolve-lib,v 1.2 2002/03/04 13:39:34 espie Exp $
|
||||
# $OpenBSD: resolve-lib,v 1.3 2002/10/01 12:16:38 naddy Exp $
|
||||
#
|
||||
# Copyright (c) 2001
|
||||
# Marc Espie. All rights reserved.
|
||||
@ -82,7 +82,7 @@ my $found_unshared;
|
||||
|
||||
while(<>) {
|
||||
chomp;
|
||||
if (!$noshared && m/^lib$libname\.so\.(\d+)\.(\d+)$/) {
|
||||
if (!$noshared && m/^lib\Q$libname\E\.so\.(\d+)\.(\d+)$/) {
|
||||
$found_shared = 1;
|
||||
my $major = $1;
|
||||
my $minor = $2;
|
||||
@ -114,7 +114,7 @@ while(<>) {
|
||||
$bestminor = $minor;
|
||||
}
|
||||
}
|
||||
} elsif (!$sharedonly && m/^lib$libname.a$/) {
|
||||
} elsif (!$sharedonly && m/^lib\Q$libname\E.a$/) {
|
||||
$found_unshared = 1;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user