Fixed missing stream length check in drive_file_query_directory

This commit is contained in:
akallabeth 2022-10-24 08:45:05 +02:00 committed by akallabeth
parent 5b90d0bc1d
commit 96aef5f1af
1 changed files with 3 additions and 0 deletions

View File

@ -626,6 +626,9 @@ static UINT drive_process_irp_query_directory(DRIVE_DEVICE* drive, IRP* irp)
Stream_Read_UINT32(irp->input, PathLength);
Stream_Seek(irp->input, 23); /* Padding */
path = (WCHAR*)Stream_Pointer(irp->input);
if (!Stream_CheckAndLogRequiredLength(TAG, irp->input, PathLength))
return ERROR_INVALID_DATA;
file = drive_get_file_by_id(drive, irp->FileId);
if (file == NULL)