summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2015-04-15 12:10:34 +0200
committerVijay Bellur <vbellur@redhat.com>2015-04-18 12:58:44 +0000
commit2ae52207f40c8ec840d6ab0907a08fed6b30282a (patch)
tree5adfb24f63f8649ca2388cd22fbfbe53a6648620
parent84df19e44801164219aaf83e61cc8f0b8b9bd08c (diff)
xlators/storage/posix: Fix Dereference before null check (CID 1293501).
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 <gd@samba.org> Reviewed-on: http://review.gluster.org/10252 Tested-by: NetBSD Build System Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r--xlators/storage/posix/src/posix.c2
1 files changed, 1 insertions, 1 deletions
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) {