mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 05:58:57 +00:00
Change open modes from ">$file" to "> $file" because it's much safer should
$file not be what you expect, particularly should $file turn out to be "+REQUIRES" since ">+" is a valid open mode. This isn't currently a problem since $file is constructed safely but it removes the potential of future problems. Pointed out by Anton Berezin.
This commit is contained in:
parent
a8bbdaecf7
commit
28d1c34421
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=70502
@ -69,7 +69,7 @@ sub get_requires($$) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (! open(REQUIRES, "<$file")) {
|
||||
if (! open(REQUIRES, "< $file")) {
|
||||
error("Can't open $file, $!");
|
||||
return 0;
|
||||
}
|
||||
@ -89,7 +89,7 @@ sub put_requires($$) {
|
||||
|
||||
my $file = "$PKG_DB/$pkg/$PKG_DEP_FILE";
|
||||
|
||||
if (! open(REQUIRES, ">$file")) {
|
||||
if (! open(REQUIRES, "> $file")) {
|
||||
error("Can't open $file, $!");
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user