mirror of
https://github.com/samba-team/samba.git
synced 2025-03-27 22:50:26 +03:00
Fix Bug 9422 - large read requests cause server to issue malformed reply
Reviewed by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Nov 30 03:27:07 CET 2012 on sn-devel-104
This commit is contained in:
parent
2f38a77a2d
commit
d5693d99b8
@ -56,7 +56,7 @@ NTSTATUS get_enc_ctx_num(const uint8_t *buf, uint16_t *p_enc_ctx_num)
|
||||
|
||||
static void smb_set_enclen(char *buf,int len,uint16_t enc_ctx_num)
|
||||
{
|
||||
_smb_setlen_nbt(buf,len);
|
||||
_smb_setlen_tcp(buf,len);
|
||||
|
||||
SCVAL(buf,4,0xFF);
|
||||
SCVAL(buf,5,'E');
|
||||
|
@ -170,7 +170,7 @@ bool srv_send_smb(struct smbd_server_connection *sconn, char *buffer,
|
||||
}
|
||||
}
|
||||
|
||||
len = smb_len(buf_out) + 4;
|
||||
len = smb_len_large(buf_out) + 4;
|
||||
|
||||
ret = write_data(sconn->sock, buf_out+nwritten, len - nwritten);
|
||||
if (ret <= 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user