diff options
author | Jeff Layton <[email protected]> | 2011-07-26 18:23:47 -0400 |
---|---|---|
committer | Steve French <[email protected]> | 2011-07-31 21:21:09 +0000 |
commit | 91d065c47317cd5f6577fa077cca3383c8d9243d (patch) | |
tree | b233806b287b9b97f9c085f2e0dc280d031961ed /net/unix/sysctl_net_unix.c | |
parent | 998d6fcb24d25b7889ec39118cf98d5089ac4c11 (diff) |
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 <[email protected]>
Signed-off-by: Jeff Layton <[email protected]>
Reviewed-by: Pavel Shilovsky <[email protected]>
Signed-off-by: Steve French <[email protected]>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions