32 lines
902 B
Diff
32 lines
902 B
Diff
From 2d656eb6b29a68de7f19e8a1cce169259e7506b4 Mon Sep 17 00:00:00 2001
|
|
From: Ondrej Holy <oholy@redhat.com>
|
|
Date: Tue, 27 Jan 2026 14:35:43 +0100
|
|
Subject: [PATCH] [codec,planar] fix decoder length checks
|
|
|
|
Backport of commit 1bab198a2edd0d0e6e1627d21a433151ea190.
|
|
|
|
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
---
|
|
libfreerdp/codec/planar.c | 5 +++++
|
|
1 file changed, 5 insertions(+)
|
|
|
|
diff --git a/libfreerdp/codec/planar.c b/libfreerdp/codec/planar.c
|
|
index fe27011e1..1cb2e22bc 100644
|
|
--- a/libfreerdp/codec/planar.c
|
|
+++ b/libfreerdp/codec/planar.c
|
|
@@ -616,6 +616,11 @@ BOOL planar_decompress(BITMAP_PLANAR_CONTEXT* planar, const BYTE* pSrcData, UINT
|
|
WINPR_ASSERT(planar);
|
|
WINPR_ASSERT(prims);
|
|
|
|
+ if (planar->maxWidth < nSrcWidth)
|
|
+ return FALSE;
|
|
+ if (planar->maxHeight < nSrcHeight)
|
|
+ return FALSE;
|
|
+
|
|
if (nDstStep <= 0)
|
|
nDstStep = nDstWidth * GetBytesPerPixel(DstFormat);
|
|
|
|
--
|
|
2.52.0
|
|
|