about summary refs log tree commit diff
path: root/sunrpc
diff options
context:
space:
mode:
Diffstat (limited to 'sunrpc')
-rw-r--r--sunrpc/svc_unix.c2
-rw-r--r--sunrpc/xcrypt.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c
index df56d9bd5c..a8ed53463e 100644
--- a/sunrpc/svc_unix.c
+++ b/sunrpc/svc_unix.c
@@ -138,7 +138,7 @@ svcunix_create (int sock, u_int sendsize, u_int recvsize, char *path)
     }
   memset (&addr, '\0', sizeof (addr));
   addr.sun_family = AF_UNIX;
-  len = strlen (addr.sun_path) + 1;
+  len = strlen (path) + 1;
   memcpy (addr.sun_path, path, len);
   len += sizeof (addr.sun_family);
 
diff --git a/sunrpc/xcrypt.c b/sunrpc/xcrypt.c
index d770a7d648..bee38ad8b5 100644
--- a/sunrpc/xcrypt.c
+++ b/sunrpc/xcrypt.c
@@ -143,7 +143,7 @@ passwd2des (char *pw, char *key)
   int i;
 
   memset (key, 0, 8);
-  for (i = 0; *pw; i = (i + 1) % 8)
+  for (i = 0; *pw && i < 8; ++i)
     key[i] ^= *pw++ << 1;
 
   des_setparity (key);