summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-03-18 12:02:51 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-03-18 12:02:51 +0000
commitec2b31b7e31c4cdd9f187b329e4f26466ba9e748 (patch)
tree43ae3168a0570d8d0298bb8c04ea821d9c12cc53
parent892599fb92b6158e86a3934c8f2045ee457f38e3 (diff)
downloadsamba-ec2b31b7e31c4cdd9f187b329e4f26466ba9e748.tar.gz
samba-ec2b31b7e31c4cdd9f187b329e4f26466ba9e748.tar.bz2
samba-ec2b31b7e31c4cdd9f187b329e4f26466ba9e748.zip
Parinoia fixes from HEAD - malloc() some extra room after the allocated
buffer size. (This used to be commit 27ec538eca0905e1f749de4c49cc2555c5932d5c)
-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();