From 2bf223a5d31cc82ffa7a06371fde6615ced3b68f Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Wed, 22 Dec 2010 04:35:10 +0000 Subject: send_fuse_iov: check args to prevent possible NULL dereferencing Signed-off-by: shishir gowda Signed-off-by: Anand V. Avati BUG: 2223 (Crash in send_fuse_err) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2223 --- xlators/mount/fuse/src/fuse-bridge.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index 6ce2e12bac3..35fb9ec8374 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -43,6 +43,10 @@ send_fuse_iov (xlator_t *this, fuse_in_header_t *finh, struct iovec *iov_out, struct fuse_out_header *fouh = NULL; int res, i; + if (!this || !finh || !iov_out) { + gf_log ("send_fuse_iov", GF_LOG_ERROR,"Invalid arguments"); + return -1; + } priv = this->private; fouh = iov_out[0].iov_base; -- cgit