On Sat, Jul 11, 2015 at 5:50 AM, Kostya Shishkov
<[email protected]> wrote:
> On Fri, Jul 10, 2015 at 09:09:44PM +0200, Luca Barbato wrote:
>> On 10/07/15 16:52, Vittorio Giovara wrote:
>> > ---
>> >  libavcodec/hq_hqa.c | 6 ++++--
>> >  1 file changed, 4 insertions(+), 2 deletions(-)
>> >
>> > diff --git a/libavcodec/hq_hqa.c b/libavcodec/hq_hqa.c
>> > index ae378e6..4871c59 100644
>> > --- a/libavcodec/hq_hqa.c
>> > +++ b/libavcodec/hq_hqa.c
>> > @@ -310,9 +310,11 @@ static int hq_hqa_decode_frame(AVCodecContext *avctx, 
>> > void *data,
>> >          return AVERROR_INVALIDDATA;
>> >      }
>> >
>> > -    info_tag = bytestream2_get_le32(&ctx->gbc);
>> > +    info_tag = bytestream2_peek_le32(&ctx->gbc);
>> >      if (info_tag == MKTAG('I', 'N', 'F', 'O')) {
>> > -        int info_size = bytestream2_get_le32(&ctx->gbc);
>> > +        int info_size;
>> > +        bytestream2_skip(&ctx->gbc, 4);
>> > +        info_size = bytestream2_get_le32(&ctx->gbc);
>> >          if (bytestream2_get_bytes_left(&ctx->gbc) < info_size) {
>> >              av_log(avctx, AV_LOG_ERROR, "Invalid INFO size (%d).\n", 
>> > info_size);
>> >              return AVERROR_INVALIDDATA;
>> >
>>
>> Ok.
>
> Doesn't that apply to HQX and CLLC as well?

No because these two do not use GetBytestream functions, but rather
AV_RL32, so offset is moved only when the INFO tag matches.
-- 
Vittorio
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to