diff options
author | H. Peter Anvin <hpa@zytor.com> | 2017-04-02 19:28:13 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2017-04-02 19:36:41 -0700 |
commit | 841d904f88884f896735da1292e42615eaaea64f (patch) | |
tree | 141bb849caf87cb7387dd8e0f32d47348e7771a9 /x86/regs.pl | |
parent | dd535a6d19d73c31878e461304d326a4c8631843 (diff) | |
download | nasm-841d904f88884f896735da1292e42615eaaea64f.tar.gz |
perl: change to the new, safer 3-operand form of open()
The 2-operand form was inherently unsafe. Use the 3-operand form
instead, which guarantees that arbitrary filenames are supported.
This also means we can remove a few instances of sysopen() which was
used for exactly this reason, however, at least in theory sysopen()
isn't portable.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'x86/regs.pl')
-rwxr-xr-x | x86/regs.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/x86/regs.pl b/x86/regs.pl index 52e5ca3e..3a1b56f5 100755 --- a/x86/regs.pl +++ b/x86/regs.pl @@ -96,7 +96,7 @@ sub process_line($) { %regs = (); %regvals = (); %disclass = (); -open(REGS, "< ${file}") or die "$0: Cannot open $file\n"; +open(REGS, '<', $file) or die "$0: Cannot open $file\n"; while ( defined($line = <REGS>) ) { $nline++; |