mirror of
https://github.com/mpv-player/mpv
synced 2025-03-01 11:50:48 +00:00
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.
This commit is contained in:
parent
4c43c30421
commit
3f73d63523
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user