X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fpasswd%2Fgetspnam_r.c;h=92339528ad170f2ed76d3bc3ba03a14b8e98c30e;hb=7c82870d4543f0eeb0e3a2638b083ff97b41a0fb;hp=15f8c87b7dfbaba74c984b08b729fd68f2170c26;hpb=b3646b30d670ac5a38674ecc492c38f7d4e92682;p=musl diff --git a/src/passwd/getspnam_r.c b/src/passwd/getspnam_r.c index 15f8c87b..92339528 100644 --- a/src/passwd/getspnam_r.c +++ b/src/passwd/getspnam_r.c @@ -98,7 +98,7 @@ int getspnam_r(const char *name, struct spwd *sp, char *buf, size_t size, struct pthread_cleanup_push(cleanup, f); while (fgets(buf, size, f) && (k=strlen(buf))>0) { - if (skip || strncmp(name, buf, l)) { + if (skip || strncmp(name, buf, l) || buf[l]!=':') { skip = buf[k-1] != '\n'; continue; }