diff options
author | Volker Lendecke <vl@samba.org> | 2014-02-28 15:50:21 +0000 |
---|---|---|
committer | David Disseldorp <ddiss@samba.org> | 2014-02-28 17:49:01 +0100 |
commit | 1dd2351840c41232d8aea912be6304b256ea0329 (patch) | |
tree | 9c590b5ab4b1e5b5d13b18027419612559fa0001 | |
parent | ca3998d0436747f637b04eb32eb6c17fce3e2159 (diff) | |
download | samba-1dd2351840c41232d8aea912be6304b256ea0329.tar.gz samba-1dd2351840c41232d8aea912be6304b256ea0329.tar.xz samba-1dd2351840c41232d8aea912be6304b256ea0329.zip |
torture: Fix a buffer overrun
In test_EnumPrinterDrivers we go up to driver level 8. In C, this means
we are accessing the 9th entry in the following lines:
ctx->driver_count[level] = count;
ctx->drivers[level] = info;
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
-rw-r--r-- | source4/torture/rpc/spoolss.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index 135eb3cb760..b61efa43ddc 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -77,8 +77,8 @@ struct test_spoolss_context { union spoolss_PortInfo *ports[3]; /* for EnumPrinterDrivers */ - uint32_t driver_count[8]; - union spoolss_DriverInfo *drivers[8]; + uint32_t driver_count[9]; + union spoolss_DriverInfo *drivers[9]; /* for EnumMonitors */ uint32_t monitor_count[3]; |