1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00

Tidyup of smbecho.

Jeremy.
This commit is contained in:
Jeremy Allison 0001-01-01 00:00:00 +00:00
parent b040be5ef9
commit 4a4b7a994b

View File

@ -2960,9 +2960,11 @@ int reply_echo(connection_struct *conn,
{
int smb_reverb = SVAL(inbuf,smb_vwv0);
int seq_num;
int data_len = smb_buflen(inbuf);
unsigned int data_len = smb_buflen(inbuf);
int outsize = set_message(outbuf,1,data_len,True);
data_len = MIN(data_len, (sizeof(inbuf)-(smb_buf(inbuf)-inbuf)));
/* copy any incoming data back out */
if (data_len > 0)
memcpy(smb_buf(outbuf),smb_buf(inbuf),data_len);