[FFmpeg-cvslog] r22715 - trunk/libavcodec/bitstream.c

Måns Rullgård mans
Wed May 5 01:20:49 CEST 2010


"Ronald S. Bultje" <rsbultje at gmail.com> writes:

> Hi,
>
> 2010/5/4 M?ns Rullg?rd <mans at mansr.com>:
>> Loren Merritt <lorenm at u.washington.edu> writes:
>>> On Sun, 2 May 2010, M?ns Rullg?rd wrote:
>>>> lorenm <subversion at mplayerhq.hu> writes:
>>>>> @@ -258,6 +275,9 @@ int init_vlc_sparse(VLC *vlc, int nb_bit
>>>>> ? ? ? ? ? ? ? const void *symbols, int symbols_wrap, int symbols_size,
>>>>> ? ? ? ? ? ? ? int flags)
>>>>> ?{
>>>>> + ? ?VLCcode buf[nb_codes];
>>>>
>>>> Sorry for not noticing this earlier, but is there any way that
>>>> variable-length array could be removed? ?Such beasts are made of pure
>>>> evil. ?We should be slaying them, not helping them spread.
>>>
>>> a) malloc.
>>
>> Would this have any measurable impact on performance? ?Is this
>> function ever called more than once per frame?
>
> If you go that way, please only do it on platforms where vararrays
> break. Doing it on all platforms seem kind of silly.

Variable-length arrays are a security risk on any platform.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-cvslog mailing list