summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-07-08 12:41:20 +0200
committerStefan Metzmacher <metze@samba.org>2011-07-08 14:09:11 +0200
commitfccc607a5dd9b9df8d6c4edac0376e819a97c301 (patch)
tree7ddda4baeee10432cf22764efefb3de2d10a1ace /source3
parentfc7359befb8939691d384824760ade97e6a74803 (diff)
downloadsamba-fccc607a5dd9b9df8d6c4edac0376e819a97c301.tar.gz
samba-fccc607a5dd9b9df8d6c4edac0376e819a97c301.tar.bz2
samba-fccc607a5dd9b9df8d6c4edac0376e819a97c301.zip
s3:client: use an inbuf on the stack in readline_callback()
metze
Diffstat (limited to 'source3')
-rw-r--r--source3/client/client.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index 780b3ebaa0..4a5a31ac09 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -4934,10 +4934,11 @@ static void readline_callback(void)
ret = poll_intr_one_fd(cli->fd, POLLIN|POLLHUP, 0, &revents);
if ((ret > 0) && (revents & (POLLIN|POLLHUP|POLLERR))) {
+ char inbuf[CLI_SAMBA_MAX_LARGE_READX_SIZE + LARGE_WRITEX_HDR_SIZE];
NTSTATUS status;
size_t len;
- status = receive_smb_raw(cli->fd, cli->inbuf, cli->bufsize, 0, 0, &len);
+ status = receive_smb_raw(cli->fd, inbuf, sizeof(inbuf), 0, 0, &len);
if (!NT_STATUS_IS_OK(status)) {
if (cli->fd != -1) {
@@ -4952,7 +4953,7 @@ static void readline_callback(void)
smb_readline_done();
return;
}
- if(CVAL(cli->inbuf,0) != SMBkeepalive) {
+ if(CVAL(inbuf,0) != SMBkeepalive) {
DEBUG(0, ("Read from server "
"returned unexpected packet!\n"));
return;