[PATCH] ctdbd_conn: Fix CID 1301580 Explicit null dereferenced
Volker Lendecke
Volker.Lendecke at SerNet.DE
Fri May 29 06:19:35 MDT 2015
Hi!
Review&push appreciated!
Thanks,
Volker
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From a6b2427d205b486ff2cd30162db3b9c955216c47 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Thu, 23 Apr 2015 18:06:17 +0200
Subject: [PATCH] ctdbd_conn: Fix CID 1301580 Explicit null dereferenced
Coverity does not really tell me which code path it sees where we could leave
hdr==NULL, but this check does not hurt.
Signed-off-by: Volker Lendecke <vl at samba.org>
---
source3/lib/ctdbd_conn.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c
index 66c87c5..3aa5ced 100644
--- a/source3/lib/ctdbd_conn.c
+++ b/source3/lib/ctdbd_conn.c
@@ -1295,7 +1295,7 @@ NTSTATUS ctdbd_parse(struct ctdbd_connection *conn, uint32_t db_id,
goto fail;
}
- if (hdr->operation != CTDB_REPLY_CALL) {
+ if ((hdr == NULL) || (hdr->operation != CTDB_REPLY_CALL)) {
DEBUG(0, ("received invalid reply\n"));
status = NT_STATUS_INTERNAL_ERROR;
goto fail;
--
1.7.9.5
More information about the samba-technical
mailing list