Ensure that tv_sec is between INT32_MIN and INT32_MAX, so ZFS won't object.

This completes the fix from r185586.

PR:		kern/139059
Reported by:	Daniel Braniss <danny@cs.huji.ac.il>
Submitted by:	Jaakko Heinonen <jh@saunalahti.fi>
Tested by:	Daniel Braniss <danny@cs.huji.ac.il>
MFC after:	3 days
This commit is contained in:
Pawel Jakub Dawidek 2009-09-26 18:23:16 +00:00
parent b8947edcb6
commit 5ff124a953
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=197525

View File

@ -1332,7 +1332,7 @@ nfsrv_create(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
tl = nfsm_dissect_nonblock(u_int32_t *,
NFSX_V3CREATEVERF);
/* Unique bytes, endianness is not important. */
cverf.tv_sec = tl[0];
cverf.tv_sec = (int32_t)tl[0];
cverf.tv_nsec = tl[1];
exclusive_flag = 1;
break;