summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/spoolss.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 2dd7164338..3536b82b50 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -2239,10 +2239,20 @@ static bool test_PrinterInfo_DevModes(struct torture_context *tctx,
devmode = info.info8.devmode;
+ if (devmode && devmode->size == 0) {
+ torture_fail(tctx,
+ "devmode of zero size!");
+ }
+
torture_assert(tctx, test_GetPrinter_level(tctx, b, handle, 2, &info), "");
devmode2 = info.info2.devmode;
+ if (devmode2 && devmode2->size == 0) {
+ torture_fail(tctx,
+ "devmode of zero size!");
+ }
+
torture_assert(tctx, test_devicemode_equal(tctx, devmode, devmode2),
"DM level 8 != DM level 2");
@@ -2384,6 +2394,11 @@ static bool test_PrinterInfo_DevMode(struct torture_context *tctx,
devmode = info.info8.devmode;
+ if (devmode && devmode->size == 0) {
+ torture_fail(tctx,
+ "devmode of zero size!");
+ }
+
if (addprinter_devmode) {
if (!test_devicemode_equal(tctx, devmode, addprinter_devmode)) {
torture_warning(tctx, "current global DM is != DM provided in addprinter");