From c892981d8272a02c44900d4c7b081da0bff6e4b3 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(-) (limited to 'src/util') diff --git a/src/util/server.c b/src/util/server.c index 8f5b4414..4b65da10 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