diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2018-09-29 13:58:08 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2018-09-29 13:58:08 +0200 |
commit | bdcef9d6928f5bdc214567937b1d219774f48b12 (patch) | |
tree | aafcc9f8ec5554a6906f1c237fcf4ed7fa77e384 /sys/src/cmd/5i | |
parent | e876447b7570808a97cbad6193b33c8af41552fe (diff) |
5i ki qi vi: avoid buffer overflow in command read loop
Diffstat (limited to 'sys/src/cmd/5i')
-rw-r--r-- | sys/src/cmd/5i/cmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/cmd/5i/cmd.c b/sys/src/cmd/5i/cmd.c index c27e5adf5..e1871c017 100644 --- a/sys/src/cmd/5i/cmd.c +++ b/sys/src/cmd/5i/cmd.c @@ -571,7 +571,7 @@ cmd(void) Bflush(bioout); p = buf; n = 0; - for(;;) { + while(n < sizeof(buf)) { i = Bgetc(bin); if(i < 0) exits(0); |