]> git.hungrycats.org Git - linux/commitdiff
fix fealist struct (xattr support part 3)
authorSteve French <stevef@smfhome.smfdom>
Mon, 14 Jun 2004 17:08:09 +0000 (12:08 -0500)
committerSteve French <stevef@smfhome.smfdom>
Mon, 14 Jun 2004 17:08:09 +0000 (12:08 -0500)
Signed-off-by: Steve French (sfrench@us.ibm.com)
fs/cifs/cifspdu.h
fs/cifs/cifssmb.c

index c56fc7055c1bf1223cb566921579c1873b06ba4a..067eb4e3eebb1a426bea374853222520d8fac172 100644 (file)
@@ -1700,7 +1700,7 @@ struct fea {
 #define FEA_NEEDEA         0x80        /* need EA bit */
 
 struct fealist {
-       unsigned long list_len;
+       __u32 list_len;
        struct fea list[1];
 };
 
index 9e97b033627ac60889b6ae3f66e04be95149a413..420742abb8de2e65b721a79d75e29bcf0357ed7d 100644 (file)
@@ -2955,8 +2955,21 @@ QAllEAsRetry:
                        memcpy((char *) pFindData,
                               (char *) &pSMBr->hdr.Protocol +
                               pSMBr->DataOffset, kl);
-               }*/ else
-                   rc = -ENOMEM;
+               }*/ else {
+                       /* check that length of list is not more than bcc */
+                       /* check that each entry does not go beyond length
+                          of list */
+                       /* check that each element of each entry does not
+                          go beyond end of list */
+                       struct fealist * ea_response_data;
+                       rc = 0;
+                       /* validate_trans2_offsets() */
+                       /* BB to check if(start of smb + pSMBr->DataOffset > &bcc+ bcc)*/
+                       ea_response_data = (struct fealist *)
+                               (((char *) &pSMBr->hdr.Protocol) +
+                               pSMBr->DataOffset);
+                       cFYI(1,("ea length %d",ea_response_data->list_len));
+               }
        }
        if (pSMB)
                cifs_buf_release(pSMB);