summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-03-21 22:38:04 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-03-21 22:38:04 +0000
commit2da9a44ba014f74835aea95d50de8ab043d2b6c5 (patch)
tree7dfb9926d1c5419966c3ef271b712ba448e0b6b8 /source3
parentd2d29ea9530a5d7077cf0ee138f1f29095e5b496 (diff)
downloadsamba-2da9a44ba014f74835aea95d50de8ab043d2b6c5.tar.gz
samba-2da9a44ba014f74835aea95d50de8ab043d2b6c5.tar.bz2
samba-2da9a44ba014f74835aea95d50de8ab043d2b6c5.zip
Clobber the 'SAFETY_MARGIN' in libsmb.
Andrew Bartlett (This used to be commit 05a63bd17e4c35979b3864b0969b2bfd945335d9)
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/clientgen.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index d969193089..e067e92f8d 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -259,9 +259,6 @@ struct cli_state *cli_initialise(struct cli_state *cli)
if (getenv("CLI_FORCE_DOSERR"))
cli->force_dos_errors = True;
- /* initialise signing */
- cli_null_set_signing(cli);
-
if (lp_client_signing())
cli->sign_info.allow_smb_signing = True;
@@ -274,6 +271,13 @@ struct cli_state *cli_initialise(struct cli_state *cli)
memset(cli->outbuf, 0, cli->bufsize);
memset(cli->inbuf, 0, cli->bufsize);
+ /* just becouse we over-allocate, doesn't mean it's right to use it */
+ clobber_region(__FUNCTION__, __LINE__, cli->outbuf+cli->bufsize, SAFETY_MARGIN);
+ clobber_region(__FUNCTION__, __LINE__, cli->inbuf+cli->bufsize, SAFETY_MARGIN);
+
+ /* initialise signing */
+ cli_null_set_signing(cli);
+
cli->nt_pipe_fnum = 0;
cli->initialised = 1;