[PATCH] fix enumprinter drivers torture test against windows

Günther Deschner gd at samba.org
Fri Nov 11 18:43:47 UTC 2016


Hi,

we first were exceeding array boundaries which was resolved in the
meantime, so we need to fillup level 8 drivers in our test context again
now (otherwise we crash).

please review & push.

Thanks,
Guenther
-- 
Günther Deschner                    GPG-ID: 8EE11688
Red Hat                         gdeschner at redhat.com
Samba Team                              gd at samba.org
-------------- next part --------------
From 3b862f289c444e8fda8212a2a8ba5d434c82fac6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=BCnther=20Deschner?= <gd at samba.org>
Date: Fri, 11 Nov 2016 16:32:20 +0100
Subject: [PATCH] s4-torture: Fix test_EnumPrinterDrivers for level 8 printer
 drivers.

Guenther

Pair-Programmed-With: Andreas Schneider <asn at samba.org>
Signed-off-by: Andreas Schneider <asn at samba.org>
Signed-off-by: Guenther Deschner <gd at samba.org>
---
 source4/torture/rpc/spoolss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 28abd14..5045c87 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -711,7 +711,7 @@ static bool test_EnumPrinterDrivers(struct torture_context *tctx,
 
 		for (j=0;j<ctx->driver_count[level - 1];j++) {
 			union spoolss_DriverInfo *cur = &ctx->drivers[level - 1][j];
-			union spoolss_DriverInfo *ref = &ctx->drivers[7][j];
+			union spoolss_DriverInfo *ref = &ctx->drivers[8][j];
 
 			switch (level) {
 			case 1:
-- 
2.7.4

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 201 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20161111/658cda38/signature.sig>


More information about the samba-technical mailing list