1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-03 04:22:09 +03:00

r8003: ensure that we don't try to send a trans request with more than 64k data or params

This commit is contained in:
Andrew Tridgell
2005-06-30 01:34:53 +00:00
committed by Gerald (Jerry) Carter
parent 2fafc23052
commit b4f2d17ace

View File

@ -216,6 +216,14 @@ struct smbcli_request *smb_raw_trans_send_backend(struct smbcli_tree *tree,
size_t namelen = 0;
uint16_t data_disp, data_length, max_data;
if (parms->in.params.length > UINT16_MAX ||
parms->in.data.length > UINT16_MAX) {
DEBUG(3,("Attempt to send invalid trans2 request (params %u, data %u)\n",
parms->in.params.length, parms->in.data.length));
return NULL;
}
if (command == SMBtrans)
padding = 1;
else