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:
parent
8d29faaa63
commit
2cc43e760b
@ -3319,7 +3319,12 @@ static int call_trans2ioctl(connection_struct *conn, char* inbuf,
|
|||||||
{
|
{
|
||||||
char *pdata = *ppdata;
|
char *pdata = *ppdata;
|
||||||
files_struct *fsp = file_fsp(inbuf,smb_vwv15);
|
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) &&
|
if ((SVAL(inbuf,(smb_setup+4)) == LMCAT_SPL) &&
|
||||||
(SVAL(inbuf,(smb_setup+6)) == LMFUNC_GETJOBID)) {
|
(SVAL(inbuf,(smb_setup+6)) == LMFUNC_GETJOBID)) {
|
||||||
pdata = Realloc(*ppdata, 32);
|
pdata = Realloc(*ppdata, 32);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user