diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-08-21 08:08:41 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-08-21 08:12:13 -0700 |
commit | ff16e04f57347e5a327099a61f8b16d5ba50abf3 (patch) | |
tree | 1e1bc7ed285652e10e6f9227ea0cd4bf242866fb /088file.mu | |
parent | e440e3e06efddb2cb6a821df32a3e07cd748bf8a (diff) | |
download | mu-ff16e04f57347e5a327099a61f8b16d5ba50abf3.tar.gz |
3237
More checks for unsafe filesystem primitives. Most important, make sure the product of any $close-file instruction is never ignored, and that it's the same variable as the ingredient. (No way to indicate that in Mu code yet, but then Mu code should always be safe and not require such checks.)
Diffstat (limited to '088file.mu')
-rw-r--r-- | 088file.mu | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/088file.mu b/088file.mu index 2eeeec2c..b18919d0 100644 --- a/088file.mu +++ b/088file.mu @@ -51,7 +51,7 @@ def transmit-from-file file:number, sink:address:sink:character -> sink:address: loop } sink <- close sink - $close-file file + file <- $close-file file ] def transmit-from-text contents:address:array:character, sink:address:sink:character -> sink:address:sink:character [ @@ -87,5 +87,5 @@ def transmit-to-file file:number, source:address:source:character -> file:number $write-to-file file, c loop } - $close-file file + file <- $close-file file ] |