From e559171130fa3fab278bfbd592315b0d7315c94e Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Thu, 17 Jun 2010 15:36:54 -0400 Subject: Initialize len before looping to read the pidfile https://fedorahosted.org/sssd/ticket/544 --- src/util/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/server.c b/src/util/server.c index 8f5b44146..4b65da102 100644 --- a/src/util/server.c +++ b/src/util/server.c @@ -120,7 +120,7 @@ int pidfile(const char *path, const char *name) pid_str[pidlen] = '\0'; - + len = 0; while ((ret = read(fd, pid_str + len, pidlen - len)) != 0) { if (ret == -1) { if (errno == EINTR || errno == EAGAIN) { -- cgit