]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
librpc: Add a NULL check to dcerpc_binding_build_tower()
authorVolker Lendecke <vl@samba.org>
Fri, 22 Jan 2021 18:40:37 +0000 (19:40 +0100)
committerVolker Lendecke <vl@samba.org>
Thu, 28 Jan 2021 16:58:35 +0000 (16:58 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Samuel Cabrero <scabrero@samba.org>
librpc/rpc/binding.c

index 80ab1a4513414da3f13f1d6ce1a682024a6001fb..05daccca7df4a8b0b56032ed03744ca64dcb4b3e 100644 (file)
@@ -1480,6 +1480,9 @@ _PUBLIC_ NTSTATUS dcerpc_binding_build_tower(TALLOC_CTX *mem_ctx,
 
        tower->num_floors = 2 + num_protocols;
        tower->floors = talloc_array(mem_ctx, struct epm_floor, tower->num_floors);
+       if (tower->floors == NULL) {
+               return NT_STATUS_NO_MEMORY;
+       }
 
        /* Floor 0 */
        tower->floors[0].lhs.protocol = EPM_PROTOCOL_UUID;