]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/cifs/cifssmb.c
Merge git://git.jan-o-sch.net/btrfs-unstable into integration
[karo-tx-linux.git] / fs / cifs / cifssmb.c
index 1a9fe7f816d1b83dd630141412d3dd109b23a385..a80f7bd97b90d541e9305d7e225c708f3f0cd3d1 100644 (file)
@@ -107,7 +107,7 @@ static void mark_open_files_invalid(struct cifs_tcon *pTcon)
 static int
 cifs_reconnect_tcon(struct cifs_tcon *tcon, int smb_command)
 {
-       int rc = 0;
+       int rc;
        struct cifs_ses *ses;
        struct TCP_Server_Info *server;
        struct nls_table *nls_codepage;
@@ -4079,7 +4079,8 @@ int CIFSFindNext(const int xid, struct cifs_tcon *tcon,
        T2_FNEXT_RSP_PARMS *parms;
        char *response_data;
        int rc = 0;
-       int bytes_returned, name_len;
+       int bytes_returned;
+       unsigned int name_len;
        __u16 params, byte_count;
 
        cFYI(1, "In FindNext");
@@ -5720,6 +5721,7 @@ CIFSSMBQAllEAs(const int xid, struct cifs_tcon *tcon,
        char *temp_ptr;
        char *end_of_smb;
        __u16 params, byte_count, data_offset;
+       unsigned int ea_name_len = ea_name ? strlen(ea_name) : 0;
 
        cFYI(1, "In Query All EAs path %s", searchName);
 QAllEAsRetry:
@@ -5837,7 +5839,8 @@ QAllEAsRetry:
                }
 
                if (ea_name) {
-                       if (strncmp(ea_name, temp_ptr, name_len) == 0) {
+                       if (ea_name_len == name_len &&
+                           strncmp(ea_name, temp_ptr, name_len) == 0) {
                                temp_ptr += name_len + 1;
                                rc = value_len;
                                if (buf_size == 0)