diff --git a/sys/src/cmd/sshfs.c b/sys/src/cmd/sshfs.c index cb5692d10..eaa32cb9d 100644 --- a/sys/src/cmd/sshfs.c +++ b/sys/src/cmd/sshfs.c @@ -1252,13 +1252,13 @@ out: void passwdparse(IDEnt **tab, char *s) { - char *p; - char *n; - int id; IDEnt *e, **b; + char *p, *n; + int id; - p = s; - for(;;){ + if(s == nil) + return; + for(p = s;;){ n = p; p = strpbrk(p, ":\n"); if(p == nil) break; if(*p != ':'){ p++; continue; } *p = 0;