librpc: Add NULL check for ndr functions for epm bindings.
authorAndreas Schneider <asn@samba.org>
Mon, 18 Feb 2013 16:32:28 +0000 (17:32 +0100)
committerAlexander Bokovoy <ab@samba.org>
Fri, 22 Feb 2013 15:36:12 +0000 (16:36 +0100)
Reviewed-by: Alexander Bokovoy <ab@samba.org>
librpc/rpc/binding.c

index ce593490fe1e2fb09a8dbde7dcb718e436f91fe5..49651e8796b692f22907f92314ef622684dd3e4f 100644 (file)
@@ -425,7 +425,12 @@ static DATA_BLOB dcerpc_floor_pack_lhs_data(TALLOC_CTX *mem_ctx, const struct nd
 {
        DATA_BLOB blob;
        enum ndr_err_code ndr_err;
-       struct ndr_push *ndr = ndr_push_init_ctx(mem_ctx);
+       struct ndr_push *ndr;
+
+       ndr = ndr_push_init_ctx(mem_ctx);
+       if (ndr == NULL) {
+               return data_blob_null;
+       }
 
        ndr->flags |= LIBNDR_FLAG_NOALIGN;