diff options
author | Anand Avati <avati@redhat.com> | 2013-11-26 13:30:46 -0800 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2013-12-02 21:47:07 -0800 |
commit | be380f35a2c9c356a8adcb9118e4f77ff9d1fec6 (patch) | |
tree | b57ed8220e50d3c4b26d3a81d2886ccc599f77a8 /xlators | |
parent | a36c812756405999d79fd29c329fef73f6b7b778 (diff) |
cluster/dht: handle NULL check before strlen/strcmp in fgetxattr
@key can legally be NULL. Handle that case without crashing.
Change-Id: Iaae293caa7eeb24afc9cd2580799173e2ce00911
BUG: 1036879
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/6395
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index f613108dcd4..110e3eebb5b 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -2349,6 +2349,7 @@ dht_fgetxattr (call_frame_t *frame, xlator_t *this, } if ((fd->inode->ia_type == IA_IFDIR) + && key && (strncmp (key, GF_XATTR_LOCKINFO_KEY, strlen (GF_XATTR_LOCKINFO_KEY) != 0))) { cnt = local->call_cnt = layout->cnt; |