from brian again: Fixes the once-in-a-blue-moon error of neglecting to add a null byte to a file being read. The only problem I've seen it actually cause is preventing group access of the last group member on the last line of /adm/users. Of course, there may also be bigger problems that could show up. But I found this one this morning. Reference: /n/atom/patch/applied/thetafsuid0 Date: Thu Feb 27 22:17:34 CET 2014 Signed-off-by: quanstro@quanstro.net --- /sys/src/cmd/θfs/uid.c Thu Feb 27 22:17:27 2014 +++ /sys/src/cmd/θfs/uid.c Thu Feb 27 22:17:28 2014 @@ -130,13 +130,14 @@ if(getmetaint(-1, meta, "length", &len) == MTnone) return nil; fb = θmalloc(sizeof(Filebuf)); - fb->buf = θmalloc(len); + fb->buf = θmalloc(len+1); n = θpread(-1, qpath, fb->buf, len, 0); if(n < len) { free(fb->buf); free(fb); return nil; } + fb->buf[len] = 0; for(p = fb->buf; p < fb->buf + n; ++p) if(*p == '\n') ++fb->nlines;