From dae208b4c59648c2f2d37a53b5b114f4221807fb Mon Sep 17 00:00:00 2001 From: nick black Date: Mon, 14 Jun 2021 02:59:25 -0400 Subject: [PATCH] ugh, dumb error in control_read() led to iterated reads --- src/lib/input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/input.c b/src/lib/input.c index 9d7245d5f..579db8bae 100644 --- a/src/lib/input.c +++ b/src/lib/input.c @@ -890,7 +890,7 @@ control_read(tinfo* tcache, int ttyfd){ if((buf = malloc(BUFSIZ)) == NULL){ return -1; } - while((s = read(ttyfd, buf, sizeof(buf))) != -1){ + while((s = read(ttyfd, buf, BUFSIZ)) != -1){ for(ssize_t idx = 0; idx < s ; ++idx){ int r = pump_control_read(&inits, buf[idx]); if(r == 1){ // success!