X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=libavcodec%2Fhqx.c;h=138d9604118c74ada6d4672573673a686d43903c;hb=1ed7fcd42af956979abf4e32cd3c9ee17622bbcb;hp=8060c7a31c08ab79d8f94904bff2e8864825ae35;hpb=443b3c03e8ef90a741b156a4c7677a427578c840;p=ffmpeg diff --git a/libavcodec/hqx.c b/libavcodec/hqx.c index 8060c7a31c0..138d9604118 100644 --- a/libavcodec/hqx.c +++ b/libavcodec/hqx.c @@ -417,8 +417,8 @@ static int hqx_decode_frame(AVCodecContext *avctx, void *data, info_tag = AV_RL32(src); if (info_tag == MKTAG('I', 'N', 'F', 'O')) { - int info_offset = AV_RL32(src + 4); - if (info_offset > UINT32_MAX - 8 || info_offset + 8 > avpkt->size) { + unsigned info_offset = AV_RL32(src + 4); + if (info_offset > INT_MAX || info_offset + 8 > avpkt->size) { av_log(avctx, AV_LOG_ERROR, "Invalid INFO header offset: 0x%08"PRIX32" is too large.\n", info_offset);