samba-spoolss: use spoolss_StringArray2 in spoolss_EnumPrinterKey.
[ira/wip.git] / librpc / gen_ndr / srv_spoolss.c
index 6ca334b3d2733f2b67975b4c609651cef2965a9e..3b981f0dbb377a90351a1a7ac5b48a84bab09d2b 100644 (file)
@@ -6325,7 +6325,7 @@ static bool api_spoolss_EnumPrinterKey(pipes_struct *p)
        }
 
        ZERO_STRUCT(r->out);
-       r->out.key_buffer = talloc_zero_array(r, uint16_t, r->in.offered / 2);
+       r->out.key_buffer = talloc_zero(r, struct spoolss_StringArray2);
        if (r->out.key_buffer == NULL) {
                talloc_free(r);
                return false;
@@ -9504,7 +9504,7 @@ NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
                case NDR_SPOOLSS_ENUMPRINTERKEY: {
                        struct spoolss_EnumPrinterKey *r = (struct spoolss_EnumPrinterKey *)_r;
                        ZERO_STRUCT(r->out);
-                       r->out.key_buffer = talloc_zero_array(mem_ctx, uint16_t, r->in.offered / 2);
+                       r->out.key_buffer = talloc_zero(mem_ctx, struct spoolss_StringArray2);
                        if (r->out.key_buffer == NULL) {
                        return NT_STATUS_NO_MEMORY;
                        }