diff options
author | Tim Potter <tpot@samba.org> | 2002-10-21 02:49:55 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2002-10-21 02:49:55 +0000 |
commit | 1188b37d6a3aae189502f263d610ea77a85dd972 (patch) | |
tree | 74b20b48bc62d8dbf55c019236284219fd8ce79d | |
parent | 051286cd46a471dfeb1663aabf2ba17e580ca25d (diff) | |
download | samba-1188b37d6a3aae189502f263d610ea77a85dd972.tar.gz samba-1188b37d6a3aae189502f263d610ea77a85dd972.tar.bz2 samba-1188b37d6a3aae189502f263d610ea77a85dd972.zip |
Zero tallocated memory in decode_printer_info, decode_driver_info,
decode_port_info and decode_printerdriver functions.
(This used to be commit e28a719f04f8812ce01d78cf84b3a2e2935b674d)
-rw-r--r-- | source3/rpc_client/cli_spoolss.c | 10 |
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); |