From 3073a2ee7e7e430631ec1516da4db2b311aea900 Mon Sep 17 00:00:00 2001 From: Volker Lendecke 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 Reviewed-by: Ira Cooper Autobuild-User(master): Volker Lendecke Autobuild-Date(master): Fri May 29 19:49:30 CEST 2015 on sn-devel-104 --- 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 66c87c55c56..3aa5ced5fb0 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; -- 2.11.4.GIT