diff libswscale/swscale_internal.h @ 26133:94cc4bac8cd0

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.
author michael
date Wed, 05 Mar 2008 03:00:25 +0000
parents afd429e00184
children 5884743208b6
line wrap: on
line diff
--- a/libswscale/swscale_internal.h	Wed Mar 05 02:46:50 2008 +0000
+++ b/libswscale/swscale_internal.h	Wed Mar 05 03:00:25 2008 +0000
@@ -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 @@
     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;