From 74f01aab15b271eff1155fa10127e78970b3180d Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Fri, 4 Oct 2019 11:46:14 +0200 Subject: [PATCH] Removed check for wrong buffer size. --- libfreerdp/codec/nsc_encode.c | 8 -------- libfreerdp/codec/nsc_sse2.c | 6 ------ 2 files changed, 14 deletions(-) diff --git a/libfreerdp/codec/nsc_encode.c b/libfreerdp/codec/nsc_encode.c index 54ee91c..11a3c56 100644 --- a/libfreerdp/codec/nsc_encode.c +++ b/libfreerdp/codec/nsc_encode.c @@ -135,14 +135,6 @@ static BOOL nsc_encode_argb_to_aycocg(NSC_CONTEXT* context, const BYTE* data, rw = (context->ChromaSubsamplingLevel ? tempWidth : context->width); ccl = context->ColorLossLevel; - /* Internal buffer must conatin height * width pixels (aligned) */ - if (context->priv->PlaneBuffersLength < context->height * rw) - return FALSE; - - /* Input stride must contain enough data for width */ - if (rw * GetBytesPerPixel(context->format) < scanline) - return FALSE; - for (y = 0; y < context->height; y++) { src = data + (context->height - 1 - y) * scanline; diff --git a/libfreerdp/codec/nsc_sse2.c b/libfreerdp/codec/nsc_sse2.c index 273f39e..d782848 100644 --- a/libfreerdp/codec/nsc_sse2.c +++ b/libfreerdp/codec/nsc_sse2.c @@ -63,12 +63,6 @@ static BOOL nsc_encode_argb_to_aycocg_sse2(NSC_CONTEXT* context, rw = (context->ChromaSubsamplingLevel > 0 ? tempWidth : context->width); ccl = context->ColorLossLevel; - if (context->priv->PlaneBuffersLength < rw * scanline) - return FALSE; - - if (rw < scanline * 2) - return FALSE; - for (y = 0; y < context->height; y++) { src = data + (context->height - 1 - y) * scanline; -- 2.7.4