Added length check when comparing names, but what will happen with the new format /adm/users? BTW, "none" matched "nonexistent", which took quite a bit of finding... Notes: Wed Jun 16 13:28:39 EDT 2004 rsc didn't i just apply this? Reference: /n/sources/patch/sorry/apeldr04 Date: Wed Jun 16 19:28:44 CES 2004 Reviewed-by: rsc --- /sys/src/ape/lib/ap/plan9/_getpw.c Wed Jun 16 19:28:44 2004 +++ /sys/src/ape/lib/ap/plan9/_getpw.c Wed Jun 16 19:28:44 2004 @@ -94,8 +94,11 @@ f4++; if(matchnum) matched = (atoi(f1) == *pnum); - else - matched = (memcmp(*pname, f2, (f3-f2)-1)==0); + else { + int length = (int) ((f3 - f2) - 1); + + matched = length == strlen (*pname) && (memcmp(*pname, f2, length)==0); + } if(matched){ /* allocate and fill in a Memo structure */ mem = (Memo*)malloc(sizeof(struct Memo));