From 2ae52207f40c8ec840d6ab0907a08fed6b30282a Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 15 Apr 2015 12:10:34 +0200 Subject: xlators/storage/posix: Fix Dereference before null check (CID 1293501). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Coverity CID 1293501. Everywhere in this call "name" is explicitly checked for NULL derreference just not here in this path. Guenther Change-Id: Ie3e7b704702cb979a036052238ed65eda1531407 BUG: 789278 Signed-off-by: Günther Deschner Reviewed-on: http://review.gluster.org/10252 Tested-by: NetBSD Build System Reviewed-by: Raghavendra Talur Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/storage/posix/src/posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/storage') diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index 50dae5db18d..337f9b95fa2 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -4132,7 +4132,7 @@ posix_fgetxattr (call_frame_t *frame, xlator_t *this, goto done; } - if (strncmp (name, GLUSTERFS_GET_OBJECT_SIGNATURE, + if (name && strncmp (name, GLUSTERFS_GET_OBJECT_SIGNATURE, strlen (GLUSTERFS_GET_OBJECT_SIGNATURE)) == 0) { op_ret = posix_fdget_objectsignature (_fd, dict); if (op_ret < 0) { -- cgit