summaryrefslogtreecommitdiffstats
path: root/TOOLS
diff options
context:
space:
mode:
authorBin Jin <bjin1990@gmail.com>2015-10-28 17:48:29 +0000
committerwm4 <wm4@nowhere>2015-11-05 17:38:20 +0100
commit3f73d6352306d470821f3ea5078b7b7f8031f0d7 (patch)
tree7e415f88bc2c4fd2ce72f618ea4d6270834118fe /TOOLS
parent4c43c30421b1d713b7a17b437e381fe1efd01902 (diff)
downloadmpv-3f73d6352306d470821f3ea5078b7b7f8031f0d7.tar.bz2
mpv-3f73d6352306d470821f3ea5078b7b7f8031f0d7.tar.xz
file2string: mark question mark as non-safe
Escaping all question marks as well, they can be used to form trigraph characters which are effective even within string literal.
Diffstat (limited to 'TOOLS')
-rwxr-xr-xTOOLS/file2string.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/TOOLS/file2string.pl b/TOOLS/file2string.pl
index d9ad215d6d..341bb06fd6 100755
--- a/TOOLS/file2string.pl
+++ b/TOOLS/file2string.pl
@@ -9,8 +9,8 @@ use warnings;
# the exact contents of the original file.
# FIXME: why not a char array?
-# treat only alphanumeric and not-" punctuation as safe
-my $unsafe_chars = qr{[^][A-Za-z0-9!#%&'()*+,./:;<=>?^_{|}~ -]};
+# treat only alphanumeric and punctuations (excluding " and ?) as safe
+my $unsafe_chars = qr{[^][A-Za-z0-9!#%&'()*+,./:;<=>^_{|}~ -]};
for my $file (@ARGV) {
open my $fh, '<:raw', $file or next;