Skip to content

Commit

Permalink
Fixed missing stream length check in drive_file_query_directory
Browse files Browse the repository at this point in the history
(cherry picked from commit 4e4bb79)
  • Loading branch information
akallabeth committed Nov 14, 2022
1 parent e865c24 commit 6655841
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions channels/drive/client/drive_main.c
Expand Up @@ -629,6 +629,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)
Expand Down

0 comments on commit 6655841

Please sign in to comment.