From 99398e8768f308f01b3298bfbc3bb783f6ea8c2f Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 6 Feb 2009 13:09:22 +0100 Subject: s4-smbtorture: fix test_GetForm. Guenther --- source4/torture/rpc/spoolss.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source4/torture/rpc/spoolss.c') diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index 707f3496b6..70c4acb025 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -663,12 +663,14 @@ static bool test_GetForm(struct torture_context *tctx, { NTSTATUS status; struct spoolss_GetForm r; + uint32_t needed; r.in.handle = handle; r.in.form_name = form_name; r.in.level = 1; r.in.buffer = NULL; r.in.offered = 0; + r.out.needed = &needed; torture_comment(tctx, "Testing GetForm\n"); @@ -676,10 +678,10 @@ static bool test_GetForm(struct torture_context *tctx, torture_assert_ntstatus_ok(tctx, status, "GetForm failed"); if (W_ERROR_EQUAL(r.out.result, WERR_INSUFFICIENT_BUFFER)) { - DATA_BLOB blob = data_blob_talloc(tctx, NULL, r.out.needed); + DATA_BLOB blob = data_blob_talloc(tctx, NULL, needed); data_blob_clear(&blob); r.in.buffer = &blob; - r.in.offered = r.out.needed; + r.in.offered = needed; status = dcerpc_spoolss_GetForm(p, tctx, &r); torture_assert_ntstatus_ok(tctx, status, "GetForm failed"); -- cgit