smb3: Replace smb2pdu 1-element arrays with flex-arrays
[platform/kernel/linux-rpi.git] / fs / cifs / smb2misc.c
index 572293c..3935a60 100644 (file)
@@ -113,7 +113,7 @@ static __u32 get_neg_ctxt_len(struct smb2_hdr *hdr, __u32 len,
        } else if (nc_offset + 1 == non_ctxlen) {
                cifs_dbg(FYI, "no SPNEGO security blob in negprot rsp\n");
                size_of_pad_before_neg_ctxts = 0;
-       } else if (non_ctxlen == SMB311_NEGPROT_BASE_SIZE)
+       } else if (non_ctxlen == SMB311_NEGPROT_BASE_SIZE + 1)
                /* has padding, but no SPNEGO blob */
                size_of_pad_before_neg_ctxts = nc_offset - non_ctxlen + 1;
        else