From 5022909fa8ac954fddc45b6ec0f08e1d6360271d Mon Sep 17 00:00:00 2001 From: michael Date: Wed, 5 Mar 2008 03:00:25 +0000 Subject: Turn ancient V offset numerical constants into named ones. Add a check that checks that the width is within the chosen constant. This might have been exploitable. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26165 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/swscale_internal.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libswscale/swscale_internal.h') diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h index aa583a6b1b..81b2f1afb9 100644 --- a/libswscale/swscale_internal.h +++ b/libswscale/swscale_internal.h @@ -31,6 +31,9 @@ #define MAX_FILTER_SIZE 256 +#define VOF 4096 +#define VOFW 2048 + typedef int (*SwsFunc)(struct SwsContext *context, uint8_t* src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t* dst[], int dstStride[]); @@ -70,7 +73,7 @@ typedef struct SwsContext{ int16_t *vChrFilter; int16_t *vChrFilterPos; - uint8_t formatConvBuffer[4000]; //FIXME dynamic alloc, but we have to change a lot of code for this to be useful + uint8_t formatConvBuffer[VOF]; //FIXME dynamic alloc, but we have to change a lot of code for this to be useful int hLumFilterSize; int hChrFilterSize; -- cgit v1.2.3