s3-rpcclient: protect against empty witness async notify messages.
authorGünther Deschner <gd@samba.org>
Mon, 14 Sep 2015 15:12:58 +0000 (17:12 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 29 Sep 2015 09:59:20 +0000 (11:59 +0200)
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
source3/rpcclient/cmd_witness.c

index bd0372f592bacb689a48fcd200cd2792551884a3..5d07dde812ce57f51c75fdf0590626348b34df2b 100644 (file)
@@ -406,6 +406,11 @@ static WERROR cmd_witness_AsyncNotify(struct rpc_pipe_client *cli,
                goto done;
        }
 
+       if (response == NULL) {
+               d_printf("Got an empty response\n");
+               goto done;
+       }
+
        switch(response->type) {
        case WITNESS_NOTIFY_RESOURCE_CHANGE:
                d_printf("Resource change");