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>
This commit is contained in:
parent
a36c812756
commit
be380f35a2
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user