]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/nfs/nfs_vfsops.c
xnu-2050.24.15.tar.gz
[apple/xnu.git] / bsd / nfs / nfs_vfsops.c
index 7a0323fde8191f3d361c2874dc657bf4f17ab7ee..1c571a21f48f955bf90b45461953891d271bfd40 100644 (file)
@@ -1575,8 +1575,12 @@ nfs_convert_old_nfs_args(mount_t mp, user_addr_t data, vfs_context_t ctx, int ar
        /* copy socket address */
        if (inkernel)
                bcopy(CAST_DOWN(void *, args.addr), &ss, args.addrlen);
-       else
-               error = copyin(args.addr, &ss, args.addrlen);
+       else {
+               if ((size_t)args.addrlen > sizeof (struct sockaddr_storage))
+                       error = EINVAL;
+               else
+                       error = copyin(args.addr, &ss, args.addrlen);
+       }
        nfsmout_if(error);
        ss.ss_len = args.addrlen;
 
@@ -2694,6 +2698,7 @@ mountnfs(
                nmp->nm_acdirmax = NFS_MAXDIRATTRTIMO;
                nmp->nm_auth = RPCAUTH_SYS;
                nmp->nm_deadtimeout = 0;
+               nmp->nm_curdeadtimeout = 0;
                NFS_BITMAP_SET(nmp->nm_flags, NFS_MFLAG_NOACL);
        }