summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-08-04 03:11:02 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:00:24 -0500
commit83d12580aa019845c7178ea1dfd5a432290b84e3 (patch)
treea8efa90b7a8fac4d84cde96c2871a68d2f755470
parent910f3dd3480248ff97454169836b799ab8be22b1 (diff)
downloadsamba-83d12580aa019845c7178ea1dfd5a432290b84e3.tar.gz
samba-83d12580aa019845c7178ea1dfd5a432290b84e3.tar.bz2
samba-83d12580aa019845c7178ea1dfd5a432290b84e3.zip
r9040: revert pointer checks that I had removed; fixes crash in calls to enumprinterdata()
(This used to be commit f81b885f46e8f7eb1e77ab0126fdf414549fd7fa)
-rw-r--r--source3/rpc_client/cli_spoolss.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c
index f2df763b4f..66d3a6437d 100644
--- a/source3/rpc_client/cli_spoolss.c
+++ b/source3/rpc_client/cli_spoolss.c
@@ -1586,9 +1586,11 @@ WERROR cli_spoolss_enumprinterdata(struct cli_state *cli, TALLOC_CTX *mem_ctx,
spoolss_io_q_enumprinterdata,
spoolss_io_r_enumprinterdata,
WERR_GENERAL_FAILURE );
-
- *value_needed = out.realvaluesize;
- *data_needed = out.realdatasize;
+
+ if ( value_needed )
+ *value_needed = out.realvaluesize;
+ if ( data_offered )
+ *data_needed = out.realdatasize;
if (!W_ERROR_IS_OK(out.status))
return out.status;