diff options
author | Anand Avati <avati@redhat.com> | 2013-11-27 10:35:30 -0800 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2013-12-04 21:12:50 -0800 |
commit | 550d83889857c1fe2c8eb04b1740a4884db7697d (patch) | |
tree | ca202488e9adf9267c54ed69703b98cc4bc0b65d | |
parent | 13a4830e9c913c9a24c6b69cd300b80302a49b65 (diff) |
cluster/afr: handle NULL check before strlen/strcmp in fgetxattr
xattr name can legally be NULL. Handle that case without crashing.
Change-Id: Ie214cb05ccd52565dc247a9234ad83ae799d3866
BUG: 1036879
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/6422
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r-- | xlators/cluster/afr/src/afr-inode-read.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-inode-read.c b/xlators/cluster/afr/src/afr-inode-read.c index ac64a763626..8a2853319c5 100644 --- a/xlators/cluster/afr/src/afr-inode-read.c +++ b/xlators/cluster/afr/src/afr-inode-read.c @@ -1405,7 +1405,7 @@ afr_is_special_xattr (const char *name, fop_getxattr_cbk_t *cbk, gf_boolean_t is_spl = _gf_true; GF_ASSERT (cbk); - if (!cbk) { + if (!cbk || !name) { is_spl = _gf_false; goto out; } |