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

bug 696; check for an invalid fid before dereferencing the fsp pointer

This commit is contained in:
Gerald Carter 0001-01-01 00:00:00 +00:00
parent 8d29faaa63
commit 2cc43e760b

View File

@ -3319,7 +3319,12 @@ static int call_trans2ioctl(connection_struct *conn, char* inbuf,
{
char *pdata = *ppdata;
files_struct *fsp = file_fsp(inbuf,smb_vwv15);
/* check for an invalid fid before proceeding */
if (!fsp)
return(ERROR_DOS(ERRDOS,ERRbadfid));
if ((SVAL(inbuf,(smb_setup+4)) == LMCAT_SPL) &&
(SVAL(inbuf,(smb_setup+6)) == LMFUNC_GETJOBID)) {
pdata = Realloc(*ppdata, 32);