summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clientgen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 3cae643c38..d969193089 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -245,8 +245,8 @@ struct cli_state *cli_initialise(struct cli_state *cli)
cli->timeout = 20000; /* Timeout is in milliseconds. */
cli->bufsize = CLI_BUFFER_SIZE+4;
cli->max_xmit = cli->bufsize;
- cli->outbuf = (char *)malloc(cli->bufsize);
- cli->inbuf = (char *)malloc(cli->bufsize);
+ cli->outbuf = (char *)malloc(cli->bufsize+SAFETY_MARGIN);
+ cli->inbuf = (char *)malloc(cli->bufsize+SAFETY_MARGIN);
cli->oplock_handler = cli_oplock_ack;
cli->use_spnego = lp_client_use_spnego();