On 07/22/2013 01:13 PM, Martin Storsjö wrote: > On Mon, 22 Jul 2013, Luca Barbato wrote: > >> Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind >> CC: libav-sta...@libav.org >> --- >> libavcodec/4xm.c | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c >> index a4e6965..2c63eb1 100644 >> --- a/libavcodec/4xm.c >> +++ b/libavcodec/4xm.c >> @@ -807,6 +807,11 @@ static int decode_frame(AVCodecContext *avctx, >> void *data, >> if (buf_size < 20) >> return AVERROR_INVALIDDATA; >> >> + if (avctx->width % 16 || avctx->height % 16) { >> + av_log(avctx, AV_LOG_ERROR, "Dimensions non-multiple of 16\n"); >> + return AVERROR_INVALIDDATA; >> + } >> + >> if (buf_size < AV_RL32(buf + 4) + 8) { >> av_log(f->avctx, AV_LOG_ERROR, "size mismatch %d %d\n", >> buf_size, AV_RL32(buf + 4)); >> -- >> 1.8.2.1 > > Looks ok in general. Perhaps s/non-multiple/not a multiple/ for the log > message, and perhaps add "are invalid" or "are unsupported". >
Yes, before discussing with Kostya it was a request_sample. _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel