From bc2e675c3a5272953fb5b4f2e39ab2c164868fab Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 9 Apr 2010 19:53:31 +0200 Subject: s4-smbtorture: make sure to check for result of spoolss_GetJob tests. This avoids returning potentially uninitialised data. Thanks Andreas for pointing this out. Guenther --- source4/torture/rpc/spoolss.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source4/torture/rpc') diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index 1517b4d57e..797cd47e69 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -2784,12 +2784,13 @@ static bool test_GetJob_args(struct torture_context *tctx, status = dcerpc_spoolss_GetJob_r(b, tctx, &r); torture_assert_ntstatus_ok(tctx, status, "GetJob failed"); - torture_assert_werr_ok(tctx, r.out.result, "GetJob failed"); - torture_assert(tctx, r.out.info, "No job info returned"); - - CHECK_NEEDED_SIZE_LEVEL(spoolss_JobInfo, r.out.info, r.in.level, lp_iconv_convenience(tctx->lp_ctx), needed, 4); } + torture_assert_werr_ok(tctx, r.out.result, "GetJob failed"); + torture_assert(tctx, r.out.info, "No job info returned"); + + CHECK_NEEDED_SIZE_LEVEL(spoolss_JobInfo, r.out.info, r.in.level, lp_iconv_convenience(tctx->lp_ctx), needed, 4); + if (info_p) { *info_p = *r.out.info; } -- cgit