summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-10-21 02:48:55 +0000
committerTim Potter <tpot@samba.org>2002-10-21 02:48:55 +0000
commit47cf2825f8ffa6327c7b392542403c5db6ad91f1 (patch)
treec59f720a60f3bf8ebd776d45418ecd493ac6079e /source3/rpc_client
parenta07df8249df02fd55098ad1caf16d84cd98fe377 (diff)
downloadsamba-47cf2825f8ffa6327c7b392542403c5db6ad91f1.tar.gz
samba-47cf2825f8ffa6327c7b392542403c5db6ad91f1.tar.bz2
samba-47cf2825f8ffa6327c7b392542403c5db6ad91f1.zip
Zero tallocated memory in decode_printer_info, decode_driver_info,
decode_port_info and decode_printerdriver functions. (This used to be commit bf2d9dd5ba2ecc7e0e1bd17049adee6dd80d807c)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_spoolss.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c
index ca24d95e33..2c3d48301b 100644
--- a/source3/rpc_client/cli_spoolss.c
+++ b/source3/rpc_client/cli_spoolss.c
@@ -56,6 +56,7 @@ static void decode_printer_info_0(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer,
PRINTER_INFO_0 *inf;
inf=(PRINTER_INFO_0 *)talloc(mem_ctx, returned*sizeof(PRINTER_INFO_0));
+ memset(inf, 0, returned*sizeof(PRINTER_INFO_0));
buffer->prs.data_offset=0;
@@ -75,6 +76,7 @@ static void decode_printer_info_1(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer,
PRINTER_INFO_1 *inf;
inf=(PRINTER_INFO_1 *)talloc(mem_ctx, returned*sizeof(PRINTER_INFO_1));
+ memset(inf, 0, returned*sizeof(PRINTER_INFO_1));
buffer->prs.data_offset=0;
@@ -94,6 +96,7 @@ static void decode_printer_info_2(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer,
PRINTER_INFO_2 *inf;
inf=(PRINTER_INFO_2 *)talloc(mem_ctx, returned*sizeof(PRINTER_INFO_2));
+ memset(inf, 0, returned*sizeof(PRINTER_INFO_2));
buffer->prs.data_offset=0;
@@ -115,6 +118,7 @@ static void decode_printer_info_3(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer,
PRINTER_INFO_3 *inf;
inf=(PRINTER_INFO_3 *)talloc(mem_ctx, returned*sizeof(PRINTER_INFO_3));
+ memset(inf, 0, returned*sizeof(PRINTER_INFO_3));
buffer->prs.data_offset=0;
@@ -135,6 +139,7 @@ static void decode_port_info_1(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer,
PORT_INFO_1 *inf;
inf=(PORT_INFO_1*)talloc(mem_ctx, returned*sizeof(PORT_INFO_1));
+ memset(inf, 0, returned*sizeof(PORT_INFO_1));
prs_set_offset(&buffer->prs, 0);
@@ -154,6 +159,7 @@ static void decode_port_info_2(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer,
PORT_INFO_2 *inf;
inf=(PORT_INFO_2*)talloc(mem_ctx, returned*sizeof(PORT_INFO_2));
+ memset(info, 0, returned*sizeof(PORT_INFO_2));
prs_set_offset(&buffer->prs, 0);
@@ -173,6 +179,7 @@ static void decode_printer_driver_1(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer,
DRIVER_INFO_1 *inf;
inf=(DRIVER_INFO_1 *)talloc(mem_ctx, returned*sizeof(DRIVER_INFO_1));
+ memset(inf, 0, returned*sizeof(DRIVER_INFO_1));
buffer->prs.data_offset=0;
@@ -192,6 +199,7 @@ static void decode_printer_driver_2(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer,
DRIVER_INFO_2 *inf;
inf=(DRIVER_INFO_2 *)talloc(mem_ctx, returned*sizeof(DRIVER_INFO_2));
+ memset(inf, 0, returned*sizeof(DRIVER_INFO_2));
buffer->prs.data_offset=0;
@@ -211,6 +219,7 @@ static void decode_printer_driver_3(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer,
DRIVER_INFO_3 *inf;
inf=(DRIVER_INFO_3 *)talloc(mem_ctx, returned*sizeof(DRIVER_INFO_3));
+ memset(inf, 0, returned*sizeof(DRIVER_INFO_3));
buffer->prs.data_offset=0;
@@ -230,6 +239,7 @@ static void decode_printerdriverdir_1 (TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer,
DRIVER_DIRECTORY_1 *inf;
inf=(DRIVER_DIRECTORY_1 *)talloc(mem_ctx, sizeof(DRIVER_DIRECTORY_1));
+ memset(inf, 0, sizeof(DRIVER_DIRECTORY_1));
prs_set_offset(&buffer->prs, 0);