[FFmpeg-devel] [PATCH] svq1dec: convert VLA to fixed size
Michael Niedermayer
michaelni
Thu Jun 24 01:47:40 CEST 2010
On Wed, Jun 23, 2010 at 11:23:51PM +0100, Mans Rullgard wrote:
> ---
> libavcodec/svq1dec.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
ok
>
> diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c
> index 2aa28ab..a34b071 100644
> --- a/libavcodec/svq1dec.c
> +++ b/libavcodec/svq1dec.c
> @@ -44,6 +44,8 @@
> #undef NDEBUG
> #include <assert.h>
>
> +#define SVQ1_MAX_WIDTH 4095
> +
> extern const uint8_t mvtab[33][2];
>
> static VLC svq1_block_type;
> @@ -730,7 +732,7 @@ static int svq1_decode_frame(AVCodecContext *avctx,
> current += 16*linesize;
> }
> } else {
> - svq1_pmv pmv[width/8+3];
> + svq1_pmv pmv[SVQ1_MAX_WIDTH/8+3];
if you do this please add a check that checks width being smaller
yes i know it is currently but someone changing this could miss this
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Asymptotically faster algorithms should always be preferred if you have
asymptotical amounts of data
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100624/e2c19a25/attachment.pgp>
More information about the ffmpeg-devel
mailing list