aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifssmb.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r--fs/cifs/cifssmb.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 1a9fe7f816d1..0580da1cf34c 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -5720,6 +5720,7 @@ CIFSSMBQAllEAs(const int xid, struct cifs_tcon *tcon,
5720 char *temp_ptr; 5720 char *temp_ptr;
5721 char *end_of_smb; 5721 char *end_of_smb;
5722 __u16 params, byte_count, data_offset; 5722 __u16 params, byte_count, data_offset;
5723 unsigned int ea_name_len;
5723 5724
5724 cFYI(1, "In Query All EAs path %s", searchName); 5725 cFYI(1, "In Query All EAs path %s", searchName);
5725QAllEAsRetry: 5726QAllEAsRetry:
@@ -5814,6 +5815,10 @@ QAllEAsRetry:
5814 list_len -= 4; 5815 list_len -= 4;
5815 temp_fea = ea_response_data->list; 5816 temp_fea = ea_response_data->list;
5816 temp_ptr = (char *)temp_fea; 5817 temp_ptr = (char *)temp_fea;
5818
5819 if (ea_name)
5820 ea_name_len = strlen(ea_name);
5821
5817 while (list_len > 0) { 5822 while (list_len > 0) {
5818 unsigned int name_len; 5823 unsigned int name_len;
5819 __u16 value_len; 5824 __u16 value_len;
@@ -5837,7 +5842,8 @@ QAllEAsRetry:
5837 } 5842 }
5838 5843
5839 if (ea_name) { 5844 if (ea_name) {
5840 if (strncmp(ea_name, temp_ptr, name_len) == 0) { 5845 if (ea_name_len == name_len &&
5846 strncmp(ea_name, temp_ptr, name_len) == 0) {
5841 temp_ptr += name_len + 1; 5847 temp_ptr += name_len + 1;
5842 rc = value_len; 5848 rc = value_len;
5843 if (buf_size == 0) 5849 if (buf_size == 0)