Blame SOURCES/Fixed-missing-length-check-in-video-channel.patch

dacebc
From bf28ea249de57acc6dfadbd778afef2093c1c283 Mon Sep 17 00:00:00 2001
dacebc
From: akallabeth <akallabeth@posteo.net>
dacebc
Date: Thu, 6 Oct 2022 09:15:40 +0200
dacebc
Subject: [PATCH] Fixed missing length check in video channel
dacebc
dacebc
Data received in video redirection channel was not checked for
dacebc
proper length.
dacebc
dacebc
(cherry picked from commit eeffd1050e9284d1464b58e049b2b4d88726632b)
dacebc
---
dacebc
 channels/video/client/video_main.c | 2 ++
dacebc
 1 file changed, 2 insertions(+)
dacebc
dacebc
diff --git a/channels/video/client/video_main.c b/channels/video/client/video_main.c
dacebc
index a21e7cdf2..a8031fc86 100644
dacebc
--- a/channels/video/client/video_main.c
dacebc
+++ b/channels/video/client/video_main.c
dacebc
@@ -930,6 +930,8 @@ static UINT video_data_on_data_received(IWTSVirtualChannelCallback* pChannelCall
dacebc
 	Stream_Read_UINT16(s, data.PacketsInSample);
dacebc
 	Stream_Read_UINT32(s, data.SampleNumber);
dacebc
 	Stream_Read_UINT32(s, data.cbSample);
dacebc
+	if (!Stream_CheckAndLogRequiredLength(TAG, s, data.cbSample))
dacebc
+		return ERROR_INVALID_DATA;
dacebc
 	data.pSample = Stream_Pointer(s);
dacebc
 
dacebc
 	/*
dacebc
-- 
dacebc
2.37.1
dacebc