View | Details | Raw Unified | Return to bug 180979
Collapse All | Expand All

(-)b/sys/netsmb/smb_smb.c (-2 / +12 lines)
Lines 771-777 Link Here
771
	u_int8_t wc;
771
	u_int8_t wc;
772
	int error, rlen, blksz;
772
	int error, rlen, blksz;
773
773
774
	if (SSTOVC(ssp)->vc_sopt.sv_caps & SMB_CAP_LARGE_READX)
774
	if (uio->uio_offset > UINT32_MAX
775
		&& !(SSTOVC(ssp)->vc_sopt.sv_caps & SMB_CAP_LARGE_FILES)) {
776
		return (EFBIG);
777
	}
778
779
	if (SSTOVC(ssp)->vc_sopt.sv_caps & (SMB_CAP_LARGE_READX | SMB_CAP_LARGE_FILES))
775
		return (smb_smb_readx(ssp, fid, len, rresid, uio, scred));
780
		return (smb_smb_readx(ssp, fid, len, rresid, uio, scred));
776
781
777
	error = smb_rq_alloc(SSTOCP(ssp), SMB_COM_READ, scred, &rqp);
782
	error = smb_rq_alloc(SSTOCP(ssp), SMB_COM_READ, scred, &rqp);
Lines 850-856 Link Here
850
	u_int8_t wc;
855
	u_int8_t wc;
851
	int error, blksz;
856
	int error, blksz;
852
857
853
	if (*len && SSTOVC(ssp)->vc_sopt.sv_caps & SMB_CAP_LARGE_WRITEX)
858
	if (uio->uio_offset > UINT32_MAX
859
		&& !(SSTOVC(ssp)->vc_sopt.sv_caps & SMB_CAP_LARGE_FILES)) {
860
		return (EFBIG);
861
	}
862
863
	if (*len && SSTOVC(ssp)->vc_sopt.sv_caps & (SMB_CAP_LARGE_WRITEX | SMB_CAP_LARGE_FILES))
854
		return (smb_smb_writex(ssp, fid, len, rresid, uio, scred));
864
		return (smb_smb_writex(ssp, fid, len, rresid, uio, scred));
855
 
865
 
856
	blksz = SSTOVC(ssp)->vc_txmax - SMB_HDRLEN - 16;
866
	blksz = SSTOVC(ssp)->vc_txmax - SMB_HDRLEN - 16;

Return to bug 180979