--- /n/sources/plan9/sys/src/cmd/cpu.c Sun Apr 14 16:33:20 2019 +++ /sys/src/cmd/cpu.c Tue Jun 23 00:00:00 2026 @@ -358,7 +358,7 @@ werrstr(""); if(setamalg(cmd) < 0){ /* modifies cmd */ writestr(fd, "unsupported auth method", nil, 0); - fatal(1, "bad auth method %s", authmeth); + fatal(0, "bad auth method %q", authmeth); } else writestr(fd, "", "", 1); free(authmeth); @@ -558,11 +558,15 @@ while(len--) { n = read(fd, str, 1); - if(n <= 0) - break; + if(n <= 0){ + if(n == 0) + werrstr("unexpected eof"); + return -1; + } if(*str++ == '\0') return 0; } + werrstr("string too long"); return -1; }