From: Jeff Layton Date: Tue, 26 Jul 2011 22:23:47 +0000 (-0400) Subject: cifs: fix name parsing in CIFSSMBQAllEAs X-Git-Tag: v3.1-rc1~96^2~8 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=91d065c47317cd5f6577fa077cca3383c8d9243d;p=pandora-kernel.git cifs: fix name parsing in CIFSSMBQAllEAs The code that matches EA names in CIFSSMBQAllEAs is incorrect. It uses strncmp to do the comparison with the length limited to the name_len sent in the response. Problem: Suppose we're looking for an attribute named "foobar" and have an attribute before it in the EA list named "foo". The comparison will succeed since we're only looking at the first 3 characters. Fix this by also comparing the length of the provided ea_name with the name_len in the response. If they're not equal then it shouldn't match. Reported-by: Jian Li Signed-off-by: Jeff Layton Reviewed-by: Pavel Shilovsky Signed-off-by: Steve French --- Reading git-diff-tree failed