s4-torture: Fix out of bound array access.
authorAndreas Schneider <asn@samba.org>
Wed, 4 Dec 2013 13:01:53 +0000 (14:01 +0100)
committerMichael Adam <obnox@samba.org>
Fri, 6 Dec 2013 00:14:09 +0000 (01:14 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
source4/torture/rpc/spoolss.c

index 5fbdbb8ca42db4289bf5ef34481040b574903eab..e6458878d5b65e2a70551aeb20b197ee31318039 100644 (file)
@@ -681,7 +681,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[8][j];
+                       union spoolss_DriverInfo *ref = &ctx->drivers[7][j];
 
                        switch (level) {
                        case 1: