summaryrefslogtreecommitdiff
path: root/Fixed-missing-stream-length-check-in-drive_file_quer.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-08-01 15:09:08 +0000
committerCoprDistGit <infra@openeuler.org>2024-08-01 15:09:08 +0000
commit0b1f438f59e230389519ba100f28b896df14e08b (patch)
tree22651934332deb73602326a03ddb24bffa8d18fc /Fixed-missing-stream-length-check-in-drive_file_quer.patch
parent5c96aee787beb29707ea3203fcef7f3b3b637153 (diff)
automatic import of freerdpopeneuler24.03_LTSopeneuler23.09
Diffstat (limited to 'Fixed-missing-stream-length-check-in-drive_file_quer.patch')
-rw-r--r--Fixed-missing-stream-length-check-in-drive_file_quer.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/Fixed-missing-stream-length-check-in-drive_file_quer.patch b/Fixed-missing-stream-length-check-in-drive_file_quer.patch
new file mode 100644
index 0000000..0c31cf5
--- /dev/null
+++ b/Fixed-missing-stream-length-check-in-drive_file_quer.patch
@@ -0,0 +1,28 @@
+From 80b2483373c00baec3a26b1d82027f16dfdd8859 Mon Sep 17 00:00:00 2001
+From: akallabeth <akallabeth@posteo.net>
+Date: Mon, 24 Oct 2022 08:45:05 +0200
+Subject: [PATCH] Fixed missing stream length check in
+ drive_file_query_directory
+
+(cherry picked from commit 4e4bb79795d6ac85473fb7a83e53ccf63d204b93)
+---
+ channels/drive/client/drive_main.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/channels/drive/client/drive_main.c b/channels/drive/client/drive_main.c
+index d3776381c..b6cf2ad32 100644
+--- a/channels/drive/client/drive_main.c
++++ b/channels/drive/client/drive_main.c
+@@ -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)
+--
+2.37.1
+