summaryrefslogtreecommitdiff
path: root/source3/libsmb/clientgen.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-03-15 06:46:05 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-03-15 06:46:05 +0000
commitdc7c505dec59329c5dde35763febab3547f6d642 (patch)
tree7a38976307fa53fe55033380d2b495de2449b64c /source3/libsmb/clientgen.c
parent16ec110b0f1fe45b598a04e171397d97c3cb5aef (diff)
downloadsamba-dc7c505dec59329c5dde35763febab3547f6d642.tar.gz
samba-dc7c505dec59329c5dde35763febab3547f6d642.tar.bz2
samba-dc7c505dec59329c5dde35763febab3547f6d642.zip
Be parinoid, malloc an extra SAFETY_MARGIN on the client's inbuf and outbuf.
Andrew Bartlett (This used to be commit 2effcae13f9dfbff40b34d32c7fd82118c3fd096)
Diffstat (limited to 'source3/libsmb/clientgen.c')
-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();