[FFmpeg-devel] [PATCH 08/16] vmdaudio: validate block type

Ronald S. Bultje rsbultje
Thu Feb 24 03:10:22 CET 2011


Hi,

On Wed, Feb 23, 2011 at 1:59 PM, Kostya <kostya.shishkov at gmail.com> wrote:
> On Wed, Feb 23, 2011 at 01:11:05PM -0500, Justin Ruggles wrote:
>> ---
>> ?libavcodec/vmdav.c | ? ?4 ++++
>> ?1 files changed, 4 insertions(+), 0 deletions(-)
>>
>
>> diff --git a/libavcodec/vmdav.c b/libavcodec/vmdav.c
>> index 0a77d37..da1852a 100644
>> --- a/libavcodec/vmdav.c
>> +++ b/libavcodec/vmdav.c
>> @@ -515,6 +515,10 @@ static int vmdaudio_decode_frame(AVCodecContext *avctx,
>> ? ? ? ? ?return buf_size;
>>
>> ? ? ?block_type = buf[6];
>> + ? ?if (block_type < BLOCK_TYPE_AUDIO || block_type > BLOCK_TYPE_SILENCE) {
>> + ? ? ? ?av_log(avctx, AV_LOG_ERROR, "unknown block type: %d\n", block_type);
>> + ? ? ? ?return AVERROR(EINVAL);
>> + ? ?}
>>
>> ? ? ?if (block_type == BLOCK_TYPE_AUDIO) {
>> ? ? ? ? ?/* the chunk contains audio */
>
> ok

Queued.

Ronald



More information about the ffmpeg-devel mailing list