From 58a538e99806ae84ec4d4bf03aa726302e16d07b Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Tue, 14 Feb 2012 12:26:29 +0530 Subject: features/quota: fix a crash in fgetxattr() by checking for NULL arg 'name' can be NULL in getxattr() as it is overloaded in glusterfs code to support listxattr() too. Change-Id: I70ccee027828e9b2b08da770f513c4edc5c7a46b BUG: 772601 Signed-off-by: Amar Tumballi Reviewed-on: http://review.gluster.com/2743 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/features/quota/src/quota.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/features/quota/src/quota.c') diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c index 8df51bbb..3710e8f9 100644 --- a/xlators/features/quota/src/quota.c +++ b/xlators/features/quota/src/quota.c @@ -2022,7 +2022,7 @@ quota_fgetxattr (call_frame_t *frame, xlator_t *this, fd_t *fd, { int32_t ret = 0; - if (strcasecmp (name, "trusted.limit.list") == 0) { + if (name && strcasecmp (name, "trusted.limit.list") == 0) { ret = quota_send_dir_limit_to_cli (frame, this, fd->inode, name); if (ret == 0) { -- cgit