From ff9e63c0975e786a69e5ecede78b178f20baceb7 Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Fri, 1 Apr 2011 02:56:18 +0000 Subject: features/quota: add NULL check before doing strcasecmp Signed-off-by: Raghavendra G Signed-off-by: Vijay Bellur BUG: 2646 (glusterfs-client crashes during getxattr) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2646 --- xlators/features/quota/src/quota.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c index e7dac765da2..8a8523a890e 100644 --- a/xlators/features/quota/src/quota.c +++ b/xlators/features/quota/src/quota.c @@ -1950,7 +1950,7 @@ quota_getxattr (call_frame_t *frame, xlator_t *this, loc_t *loc, { int32_t ret = 0; - if (strcasecmp (name, "trusted.limit.list") == 0) { + if ((name != NULL) && strcasecmp (name, "trusted.limit.list") == 0) { ret = quota_send_dir_limit_to_cli (frame, this, loc->inode, name); if (ret == 0) -- cgit