ref: 4ec62786df825087ee397709f764b1d25310bbe5
parent: 4413bdcf9c387a2dde08eb2ca0757d8d9c6aca93
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Wed Dec 26 00:04:56 EST 2018
mk: fix closing random fd from uninitialized stack variable (thanks BurnZeZ, mycroftiv) mycroftiv → this is practically "500 mile email" territory - the "6 letter mk bug"
--- a/sys/src/cmd/mk/plan9.c
+++ b/sys/src/cmd/mk/plan9.c
@@ -199,7 +199,8 @@
perror(shell);
_exits("exec");}
- close(out[1]);
+ if(buf)
+ close(out[1]);
close(in[0]);
p = cmd+strlen(cmd);
while(cmd < p){--
⑨