summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-11-24 15:22:04 +0100
committerKarolin Seeger <kseeger@samba.org>2009-12-23 12:07:50 +0100
commit73ea8ab474a06703a92f0295b687002b1bcbb333 (patch)
tree7757197f7be3176bcefecc9541323f9a9a9d2bec /source3/rpc_client
parent9aa738c8ec6cc8cd37bed892f3dc0298596484eb (diff)
downloadsamba-73ea8ab474a06703a92f0295b687002b1bcbb333.tar.gz
s3-spoolss: fixes for _spoolss_EnumPrinterKey client and server.
Thanks Metze for review! Guenther (cherry picked from commit 846aa18648f3b34ab5cbc4dc4ba334bbedeab2f4) (cherry picked from commit 29c22e159352bcb334dfb7c5846e865967d77cb0)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_spoolss.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c
index ff8736df9f6..5522ca75f3d 100644
--- a/source3/rpc_client/cli_spoolss.c
+++ b/source3/rpc_client/cli_spoolss.c
@@ -765,7 +765,7 @@ WERROR rpccli_spoolss_enumprinterkey(struct rpc_pipe_client *cli,
*key_buffer = NULL;
if (offered) {
- buffer = talloc_array(mem_ctx, uint16_t, offered);
+ buffer = talloc_array(mem_ctx, uint16_t, offered/2);
W_ERROR_HAVE_NO_MEMORY(buffer);
}
@@ -779,7 +779,7 @@ WERROR rpccli_spoolss_enumprinterkey(struct rpc_pipe_client *cli,
if (W_ERROR_EQUAL(werror, WERR_MORE_DATA)) {
offered = needed;
- buffer = talloc_realloc(mem_ctx, buffer, uint16_t, needed);
+ buffer = talloc_realloc(mem_ctx, buffer, uint16_t, needed/2);
W_ERROR_HAVE_NO_MEMORY(buffer);
status = rpccli_spoolss_EnumPrinterKey(cli, mem_ctx,
handle,