From: Olaf Johansson Date: Tue, 2 Jun 2015 11:41:35 +0000 (-0400) Subject: GH249: Fix bad regexp in arg parsing. X-Git-Tag: OpenSSL_1_0_2b~39 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=bd5b5b4c4bda92399bf2b96cf399d6fef107856e;p=oweals%2Fopenssl.git GH249: Fix bad regexp in arg parsing. Signed-off-by: Rich Salz Reviewed-by: Richard Levitte (cherry picked from commit 8846adbd36c1de2b0d38a73ca32e28fde50083b8) --- diff --git a/tools/c_rehash.in b/tools/c_rehash.in index 887e927125..b086ff9cf0 100644 --- a/tools/c_rehash.in +++ b/tools/c_rehash.in @@ -15,13 +15,13 @@ my $symlink_exists=eval {symlink("",""); 1}; my $removelinks = 1; ## Parse flags. -while ( $ARGV[0] =~ '-.*' ) { +while ( $ARGV[0] =~ /^-/ ) { my $flag = shift @ARGV; last if ( $flag eq '--'); - if ( $flag =~ /-old/) { + if ( $flag eq '-old') { $x509hash = "-subject_hash_old"; $crlhash = "-hash_old"; - } elsif ( $flag =~ /-h/) { + } elsif ( $flag eq '-h') { help(); } elsif ( $flag eq '-n' ) { $removelinks = 0;