summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2010-12-22 04:35:10 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-12-27 20:51:17 -0800
commit2bf223a5d31cc82ffa7a06371fde6615ced3b68f (patch)
treead81f6541b8640d7686cb860e4a61e645d166a75
parent2e317d2d35a50a6440865de5445008fd814cd298 (diff)
send_fuse_iov: check args to prevent possible NULL dereferencing
Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2223 (Crash in send_fuse_err) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2223
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
index 6ce2e12ba..35fb9ec83 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;