ref: 8207a74723d9f6cff10323623b782baa090411b1
parent: 93f3d43a2889287a96e003124ec61290c5bf80f6
author: qwx <[email protected]>
date: Sat Mar 6 21:04:49 EST 2021
mev,tev: fix not initializing kproc buffer
--- a/mev.c
+++ b/mev.c
@@ -138,6 +138,7 @@
fd = open("/dev/kbd", OREAD);
if(fd < 0)
sysfatal("open: %r");
+ memset(buf, 0, sizeof buf);
for(;;){
if(buf[0] != 0){
n = strlen(buf)+1;
--- a/tev.c
+++ b/tev.c
@@ -57,6 +57,7 @@
fd = open("/dev/kbd", OREAD);
if(fd < 0)
sysfatal("open: %r");
+ memset(buf, 0, sizeof buf);
for(;;){
if(buf[0] != 0){
n = strlen(buf)+1;