From 3fd5ac63443717fd596546602d2e5477923f8f3d Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 11 Mar 2010 00:07:00 +0100 Subject: s4-smbtorture: only look at DATA_BLOB pointer when einfo[0].data_length > 0. Guenther --- source4/torture/rpc/spoolss.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index 4ff79f2631..c66ca848f3 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -3491,7 +3491,9 @@ static bool test_SetPrinterDataEx_matrix(struct torture_context *tctx, torture_assert_int_equal(tctx, einfo[0].value_name_len, strlen_m_term(value_name)*2, "unexpected value_name_len"); torture_assert_int_equal(tctx, einfo[0].type, types[t], "type mismatch"); torture_assert_int_equal(tctx, einfo[0].data_length, offered, "size mismatch"); - torture_assert_mem_equal(tctx, einfo[0].data->data, data.data, offered, "buffer mismatch"); + if (einfo[0].data_length > 0) { + torture_assert_mem_equal(tctx, einfo[0].data->data, data.data, offered, "buffer mismatch"); + } if (winreg_pipe && hive_handle) { const char *printer_key; -- cgit