diff options
author | Günther Deschner <gd@samba.org> | 2010-04-09 19:53:31 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-04-09 20:00:56 +0200 |
commit | bc2e675c3a5272953fb5b4f2e39ab2c164868fab (patch) | |
tree | b6617245f4912e7b2c160ea49a42b78a535bc934 /source4/torture | |
parent | 357006bf074a0c6788b948f0c0260ec85caeec09 (diff) | |
download | samba-bc2e675c3a5272953fb5b4f2e39ab2c164868fab.tar.gz samba-bc2e675c3a5272953fb5b4f2e39ab2c164868fab.tar.bz2 samba-bc2e675c3a5272953fb5b4f2e39ab2c164868fab.zip |
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
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/rpc/spoolss.c | 9 |
1 files changed, 5 insertions, 4 deletions
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; } |