]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdbd_conn: Fix CID 1301580 Explicit null dereferenced
authorVolker Lendecke <vl@samba.org>
Thu, 23 Apr 2015 16:06:17 +0000 (18:06 +0200)
committerVolker Lendecke <vl@samba.org>
Fri, 29 May 2015 17:49:29 +0000 (19:49 +0200)
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@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri May 29 19:49:30 CEST 2015 on sn-devel-104

source3/lib/ctdbd_conn.c

index 66c87c55c56bbb5fe3cd66f2f3addc32635fa80a..3aa5ced5fb013ab9a6e967faf84cbab962a18827 100644 (file)
@@ -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;