Skip to content

Commit

Permalink
util/dofile.pl: only quote stuff that actually needs quoting
Browse files Browse the repository at this point in the history
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from openssl#5533)
  • Loading branch information
levitte committed Mar 6, 2018
1 parent cd15cb4 commit 49cd47e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions util/dofile.pl
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ package main;
# This adds quotes (") around the given string, and escapes any $, @, \,
# " and ' by prepending a \ to them.
sub quotify1 {
my $s = shift @_;
my $s = my $orig = shift @_;
$s =~ s/([\$\@\\"'])/\\$1/g;
'"'.$s.'"';
$s ne $orig || $s =~ /\s/ ? '"'.$s.'"' : $s;
}

# quotify_l LIST
Expand Down

0 comments on commit 49cd47e

Please sign in to comment.