File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1053,16 +1053,16 @@ int smb2_handle_negotiate(struct ksmbd_work *work)
1053
1053
return rc ;
1054
1054
}
1055
1055
1056
- if (req -> DialectCount == 0 ) {
1057
- pr_err ("malformed packet\n" );
1056
+ smb2_buf_len = get_rfc1002_len (work -> request_buf );
1057
+ smb2_neg_size = offsetof(struct smb2_negotiate_req , Dialects );
1058
+ if (smb2_neg_size > smb2_buf_len ) {
1058
1059
rsp -> hdr .Status = STATUS_INVALID_PARAMETER ;
1059
1060
rc = - EINVAL ;
1060
1061
goto err_out ;
1061
1062
}
1062
1063
1063
- smb2_buf_len = get_rfc1002_len (work -> request_buf );
1064
- smb2_neg_size = offsetof(struct smb2_negotiate_req , Dialects );
1065
- if (smb2_neg_size > smb2_buf_len ) {
1064
+ if (req -> DialectCount == 0 ) {
1065
+ pr_err ("malformed packet\n" );
1066
1066
rsp -> hdr .Status = STATUS_INVALID_PARAMETER ;
1067
1067
rc = - EINVAL ;
1068
1068
goto err_out ;
You can’t perform that action at this time.
0 commit comments