diff options
author | Jeremy Allison <jra@samba.org> | 2000-04-27 16:53:31 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2000-04-27 16:53:31 +0000 |
commit | c4af7ad8dc75ca252c6e8812b126a171849cc7d2 (patch) | |
tree | 269e1d579a49206e5114235a60005d9700ccc22a /source3/smbd | |
parent | 03699e711e2464ff18d697dc865cd8e46ffacddb (diff) | |
download | samba-c4af7ad8dc75ca252c6e8812b126a171849cc7d2.tar.gz samba-c4af7ad8dc75ca252c6e8812b126a171849cc7d2.tar.bz2 samba-c4af7ad8dc75ca252c6e8812b126a171849cc7d2.zip |
Tidyup of smbecho.
Jeremy.
(This used to be commit 4a4b7a994bbe327216f736133edc51cf9a351716)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/reply.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 590dc4f427..4134df221e 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -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); |